Changeset 7488


Ignore:
Timestamp:
08/23/09 07:14:03 (2 years ago)
Author:
azawawi
Message:

[Padre] Perl tidy

Location:
trunk/Padre/lib/Padre
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/QuickFixProvider/Perl.pm

    r7486 r7488  
    2727# 
    2828sub quick_fix_list { 
    29     my ($self, $doc, $editor) = @_; 
    30      
    31     my @items = (); 
    32     my $text = $editor->GetText; 
     29    my ( $self, $doc, $editor ) = @_; 
     30 
     31    my @items           = (); 
     32    my $text            = $editor->GetText; 
    3333    my $current_line_no = $editor->GetCurrentLine; 
    3434 
    35     if($text !~ /^\s*use strict/msx) { 
     35    if ( $text !~ /^\s*use strict/msx ) { 
    3636        push @items, { 
    37             text => qq{Add 'use strict;'}, 
     37            text     => qq{Add 'use strict;'}, 
    3838            listener => sub { 
    3939                $text = 'use strict;' . $text; 
    40             } 
     40                } 
    4141        }; 
    4242    } 
    43     if($text !~ /^\s*use warnings/msx) { 
     43    if ( $text !~ /^\s*use warnings/msx ) { 
    4444        push @items, { 
    45             text => qq{Add 'use warnings;'}, 
     45            text     => qq{Add 'use warnings;'}, 
    4646            listener => sub { 
    4747                $text = 'use warnings;' . $text; 
     48 
    4849                #$editor->ReplaceSelection( 
    49             } 
     50                } 
    5051        }; 
    5152    } 
  • trunk/Padre/lib/Padre/Wx/Main.pm

    r7461 r7488  
    27222722    my $self = shift; 
    27232723    my $dir  = shift; 
    2724      
     2724 
    27252725    if ($dir) { 
    27262726        $self->{cwd} = $dir; 
  • trunk/Padre/lib/Padre/Wx/Menu/Edit.pm

    r7484 r7488  
    178178            my @list  = (); 
    179179            my @items = (); 
    180             eval {  
     180            eval { 
     181 
    181182                # Find available quick fixes from provider 
    182                 my $provider = $doc->get_quick_fix_provider;  
    183                 @items = $provider->quick_fix_list($doc, $editor); 
     183                my $provider = $doc->get_quick_fix_provider; 
     184                @items = $provider->quick_fix_list( $doc, $editor ); 
    184185 
    185186                # Add quick list items from document's quick fix provider 
     
    188189                } 
    189190            }; 
    190             if($@) { 
     191            if ($@) { 
    191192                warn "Error while calling get_quick_fix_provider: $@\n"; 
    192193            } 
Note: See TracChangeset for help on using the changeset viewer.