Skip Menu |

This queue is for tickets about the Parse-Marpa CPAN distribution.

Report information
The Basics
Id: 45136
Status: resolved
Priority: 0/
Queue: Parse-Marpa

People
Owner: jkegl [...] cpan.org
Requestors: pcwalton [...] cs.ucla.edu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.002000
Fixed in: 1.003_000



Subject: Marpa.pm tries to call die_with_parse_failure
When parsing fails, Marpa.pm tries to call die_with_parse_failure from the Parse::Marpa::Internal package. But that function is located in Parse::Marpa::Internal::Grammar (in Grammar.pm). So it fails: Undefined subroutine &Parse::Marpa::Internal::die_with_parse_failure called at /usr/share/perl5/vendor_perl/Parse/Marpa.pm line 159. A workaround is: *Parse::Marpa::Internal::die_with_parse_failure = *Parse::Marpa::Internal::Grammar::die_with_parse_failure{CODE};
On Sun Apr 19 00:54:45 2009, pcwalton wrote: Show quoted text
> When parsing fails, Marpa.pm tries to call die_with_parse_failure from > the Parse::Marpa::Internal package. But that function is located in > Parse::Marpa::Internal::Grammar (in Grammar.pm). So it fails: > > Undefined subroutine &Parse::Marpa::Internal::die_with_parse_failure > called at /usr/share/perl5/vendor_perl/Parse/Marpa.pm line 159. > > A workaround is: > *Parse::Marpa::Internal::die_with_parse_failure = > *Parse::Marpa::Internal::Grammar::die_with_parse_failure{CODE};
Thanks. Since freezing Parse::Marpa I've switched to using perlcritic's Modules::RequireExplicitInclusion to prevent this kind of bug. That's what I believe I'll do here.
I've made the fix by resolving all subroutine references to the satisfaction of perlcritic's Modules::RequireExplicitInclusion policy. In the process I made the code perlcritic and perltidy clean. The fix is in developer's version 1.003_000. If you can try it out, I'd appreciate it. I wait a few days for you and cpantester's feedback, then roll out an official release if all looks good.
Correction: the policy I'm using is actually Subroutines::ProhibitCallsToUndeclaredSubs in Perl::Critic::StricterSubs. But, anyway, the problem is fixed in developer's version 1.003_000, released earlier today.
Just put an official release with this fix on CPAN: 1.004000.