Opened 3 years ago

Closed 3 years ago

#1266 closed enhancement (fixed)

Padre::Plugin::PerlCritic, fix for missing version

Reported by: bowtie Owned by: azawawi
Priority: major Milestone:
Component: plugins Version: 0.87
Keywords: missing version Cc:

Description

Padre::Plugin::PerlCritic, fix for missing version, so as to be able to run from trunk, also menu mod,

  • lib/Padre/Plugin/PerlCritic.pm

     
    77use warnings; 
    88use Padre::Wx     (); 
    99use Padre::Plugin (); 
     10our $VERSION = 0.12; 
    1011 
    1112our @ISA = 'Padre::Plugin'; 
    1213 
     
    1819    Wx::gettext('Perl Critic'); 
    1920} 
    2021 
    21 sub menu_plugins_simple { 
     22sub menu_plugins { 
    2223    my $self = shift; 
    23     return $self->plugin_name => [ 
    24         Wx::gettext('Perl::Critic Current Document') => sub { 
    25             $self->critic(@_); 
    26             } 
    27     ]; 
     24    my $main = shift; 
     25 
     26    # Create a manual menu item 
     27    my $item = Wx::MenuItem->new( 
     28        undef, 
     29        -1, 
     30        $self->plugin_name, 
     31    ); 
     32    Wx::Event::EVT_MENU( 
     33        $main, 
     34        $item, 
     35        sub { 
     36            local $@; 
     37            eval { 
     38                $self->critic(@_); 
     39            }; 
     40        }, 
     41    ); 
     42 
     43    return $item; 
    2844} 
    2945 
    3046sub critic { 

Attachments (1)

PerlCritic.pm.patch (2.4 KB) - added by bowtie 3 years ago.
as per http://irclog.perlgeek.de/padre/2011-08-29#i_4340776

Download all attachments as: .zip

Change History (3)

comment:1 Changed 3 years ago by bowtie

As per previous conversation

I even ran Perl-Critic against plug-in

comment:2 Changed 3 years ago by bowtie

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.