Changeset 10621

Show
Ignore:
Timestamp:
02/08/10 03:51:35 (7 months ago)
Author:
azawawi
Message:

Perl tidy

Location:
trunk/Padre
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/Padre/dev.pl

    r10615 r10621  
    3636                'debug|d'     => \$DEBUG, 
    3737                'trace'       => sub { $ENV{PADRE_DEBUG} = 1 }, 
    38                 'die'         => sub { $ENV{PADRE_DIE}   = 1 }, 
     38                'die'         => sub { $ENV{PADRE_DIE} = 1 }, 
    3939                'profile'     => \$PROFILE, 
    4040                'a'           => \$PLUGINS, 
     
    8282 
    8383if ($FULLTRACE) { 
    84         eval { 
    85                 require Devel::Trace; 
    86         }; 
     84        eval { require Devel::Trace; }; 
    8785        if ($@) { 
    8886                print "Error while initilizing --fulltrace while trying to load Devel::Trace:\n" 
     
    115113push @cmd, '--help' if $USAGE; 
    116114 
    117 if ( $DEBUG ) { 
     115if ($DEBUG) { 
    118116        print "Running " . join( ' ', @cmd ) . "\n"; 
    119117} 
    120118 
    121 if ( $USAGE ) { 
     119if ($USAGE) { 
    122120        usage(); 
    123121} 
  • trunk/Padre/lib/Padre/Constant.pm

    r10615 r10621  
    102102); 
    103103 
    104 use constant LOG_FILE       => File::Spec->catfile( CONFIG_DIR, 'debug.log' ); 
    105 use constant PLUGIN_DIR     => File::Spec->catdir( CONFIG_DIR, 'plugins' ); 
    106 use constant PLUGIN_LIB     => File::Spec->catdir( PLUGIN_DIR, 'Padre', 'Plugin' ); 
     104use constant LOG_FILE => File::Spec->catfile( CONFIG_DIR, 'debug.log' ); 
     105use constant PLUGIN_DIR => File::Spec->catdir( CONFIG_DIR, 'plugins' ); 
     106use constant PLUGIN_LIB => File::Spec->catdir( PLUGIN_DIR, 'Padre', 'Plugin' ); 
    107107use constant CONFIG_HOST    => File::Spec->catfile( CONFIG_DIR, 'config.db' ); 
    108108use constant CONFIG_HUMAN   => File::Spec->catfile( CONFIG_DIR, 'config.yml' ); 
     
    112112# so we can run it again later if needed. 
    113113sub init { 
     114 
    114115        # Check and create the directories that need to exist 
    115116        unless ( -e CONFIG_DIR or File::Path::mkpath(CONFIG_DIR) ) { 
     
    140141# NOTE: The only reason this is here is that it is needed both during 
    141142# main configuration, and also during Padre::Startup. 
    142 use constant DEFAULT_SINGLEINSTANCE => ( 
    143         WIN32 and not( $ENV{HARNESS_ACTIVE} or $^P ) 
    144 ) ? 1 : 0; 
     143use constant DEFAULT_SINGLEINSTANCE => ( WIN32 and not( $ENV{HARNESS_ACTIVE} or $^P ) ) ? 1 : 0; 
    145144 
    146145use constant DEFAULT_SINGLEINSTANCE_PORT => 4444; 
  • trunk/Padre/lib/Padre/Plugin/PopularityContest/Ping.pm

    r10615 r10621  
    3535 
    3636        # Hand off to the parent constructor 
    37         return $class->SUPER::new( 
    38                 request => HTTP::Request->new( GET => $url->as_string ) 
    39         ); 
     37        return $class->SUPER::new( request => HTTP::Request->new( GET => $url->as_string ) ); 
    4038} 
    4139 
  • trunk/Padre/lib/Padre/Task/HTTPClient.pm

    r10615 r10621  
    5252        require Padre::Util::SVN; 
    5353        my $revision = Padre::Util::SVN::padre_version(); 
    54         $args{method}               ||= 'GET'; 
     54        $args{method} ||= 'GET'; 
    5555        $args{headers}->{'X-Padre'} ||= "Padre version $VERSION $revision"; 
    5656 
    5757        # Each module will be tested and the first working one should return 
    5858        # a object, all others should return nothing (undef) 
    59         foreach my $driver ( @DRIVERS ) { 
     59        foreach my $driver (@DRIVERS) { 
    6060                eval "require $driver;"; 
    6161                next if $@; 
  • trunk/Padre/lib/Padre/Util/SVN.pm

    r10618 r10621  
    1515# TODO: A much better variant would be a constant set by svn. 
    1616sub padre_revision { 
    17         unless ( $PADRE ) { 
     17        unless ($PADRE) { 
    1818                if ( $0 =~ /padre$/ ) { 
    1919                        my $dir = $0; 
  • trunk/Padre/lib/Padre/Wx/Dialog/RegexEditor.pm

    r10616 r10621  
    394394        $str   = '' unless $str; 
    395395        $level = 0  unless $level; 
    396         my @children = $parent->isa('PPIx::Regexp::Node') ? $parent->children: (); 
     396        my @children = $parent->isa('PPIx::Regexp::Node') ? $parent->children : (); 
    397397        for my $child (@children) { 
    398398                next if $child->content eq ''; 
     
    412412        $position = 0  unless $position; 
    413413        @array    = () unless @array; 
    414         my @elements = $parent->isa('PPIx::Regexp::Node') ? $parent->elements: (); 
     414        my @elements = $parent->isa('PPIx::Regexp::Node') ? $parent->elements : (); 
    415415        for my $element (@elements) { 
    416416                my $content = $element->content;