Ticket #1274 (closed defect: not relevant)
--die Plugin-Manager & Pod::Abstract::Path bleeding into Padre $SIG
| Reported by: | bowtie | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | not classified yet | Version: | 0.87 |
| Keywords: | $SIG __DIE__ | Cc: | Alias, zenog |
Description
when you run Padre from trunk, with perl dev -a --die and open Plugin Manager you get a screen full of this.
DIE: Can't call method "can" on unblessed reference at /home/kevin/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Pod/Abstract/Path.pm line 471.
--------------------------------------------------------------------------------
at /home/kevin/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Pod/Abstract/Path.pm line 471
eval {...} called at /home/kevin/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Pod/Abstract/Path.pm line 471
Pod::Abstract::Path::match_expression('Pod::Abstract::Path=HASH(0x127b9968)', 'ARRAY(0x127b99b8)', 'test_regexp', 0, 'Pod::Abstract::Path=HASH(0x127b9838)', 'ARRAY(0x127b9828)') called at /home/kevin/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Pod/Abstract/Path.pm line 359
Pod::Abstract::Path::process('Pod::Abstract::Path=HASH(0x127b9968)', 'Pod::Abstract::Node=HASH(0x127a2be0)') called at /home/kevin/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Pod/Abstract/Node.pm line 275
Pod::Abstract::Node::select('Pod::Abstract::Node=HASH(0x127a2be0)', '/head1[@heading =~ {NAME}]') called at /usr/src/Padre/Padre/lib/Padre/Browser/POD.pm line 121
Padre::Browser::POD::resolve('Padre::Browser::POD', 'Padre::Plugin::My', undef) called at /usr/src/Padre/Padre/lib/Padre/Browser.pm line 289
Padre::Browser::resolve('Padre::Browser=HASH(0xf6a1a28)', 'Padre::Plugin::My') called at /usr/src/Padre/Padre/lib/Padre/Wx/Dialog/PluginManager.pm line 244
Padre::Wx::Dialog::PluginManager::list_item_selected('Padre::Wx::Dialog::PluginManager=HASH(0x119675a0)', 'Wx::ListEvent=SCALAR(0x9090608)') called at /usr/src/Padre/Padre/lib/Padre/Wx/Dialog/PluginManager.pm line 74
Padre::Wx::Dialog::PluginManager::__ANON__('Padre::Wx::Dialog::PluginManager=HASH(0x119675a0)', 'Wx::ListEvent=SCALAR(0x9090608)') called at /usr/src/Padre/Padre/lib/Padre/Wx/Dialog/PluginManager.pm line 211
eval {...} called at /usr/src/Padre/Padre/lib/Padre/Wx/Dialog/PluginManager.pm line 211
Padre::Wx::Dialog::PluginManager::show('Padre::Wx::Dialog::PluginManager=HASH(0x119675a0)') called at /usr/src/Padre/Padre/lib/Padre/Wx/ActionLibrary.pm line 2389
Padre::Wx::ActionLibrary::__ANON__('Padre::Wx::Main=HASH(0x9f034f0)', 'Wx::CommandEvent=SCALAR(0xb850f78)') called at /usr/src/Padre/Padre/lib/Padre/Wx/Action.pm line 217
Padre::Wx::Action::_event('Padre::Wx::Action=HASH(0xa0ebff0)', 'Padre::Wx::Main=HASH(0x9f034f0)', 'Wx::CommandEvent=SCALAR(0xb850f78)') called at /usr/src/Padre/Padre/lib/Padre/Wx/Action.pm line 102
Padre::Wx::Action::__ANON__('Padre::Wx::Main=HASH(0x9f034f0)', 'Wx::CommandEvent=SCALAR(0xb850f78)') called at /usr/src/Padre/Padre/lib/Padre.pm line 249
eval {...} called at /usr/src/Padre/Padre/lib/Padre.pm line 249
Padre::run('Padre=HASH(0x91a5178)') called at /usr/src/Padre/Padre/script/padre line 178
this is caused by the eval line 471 from Pod::Abstract::Path
sub match_expression { my $self = shift; my $ilist = shift; my $test_action = shift; my $invert = shift; my $exp = shift; my $r_exp = shift; my $op = shift; # Only for some operators my $nlist = [ ]; foreach my $n(@$ilist) { my @t_list = $exp->process($n); my $t_result; # Allow for r_exp to be another expression - generate both # node lists if required. if( eval { $r_exp->can('process') } ) { my @r_list = $r_exp->process($n); $t_result = $self->$test_action(\@t_list, \@r_list, $op); } else { $t_result = $self->$test_action(\@t_list, $r_exp, $op); } $t_result = !$t_result if $invert; if($t_result) { push @$nlist, $n; } } return $nlist; }
As this Module is not part of Padre, hence we might not see a valid padre $SIG as they could be mixed in with Pod::Abstract::Path bleeding.
So here is a patch to stop it bleeding into Padre $SIG handler.
-
lib/Padre/Browser/POD.pm
70 70 71 71 return unless -s $tempfile; 72 72 73 my $pa = Pod::Abstract->load_file($tempfile); 73 my $pa; 74 local $SIG{__DIE__} = 'IGNORE'; 75 eval { $pa = Pod::Abstract->load_file($tempfile); }; 76 local $SIG{__DIE__} = 'DEFAULT'; 74 77 close $fh; 75 78 unlink($tempfile);
Some more guidance would be nice, what next??
Change History
Note: See
TracTickets for help on using
tickets.

a little kick for hyppolit