[Melbourne-pm] Module::Signatures and typos in packages
Michael G Schwern
schwern at pobox.com
Thu Aug 18 20:33:21 PDT 2011
On 2011.8.11 2:06 AM, Toby Corkindale wrote:
> Jacinta mentioned Method::Signatures a little last night in her presentation.
> I hit an interesting problem with the module today.
> If your file has some errors in it, then instead of getting an error like
> "Global symbol "$args" requires explicit package name at [..]", you get an
> error like this:
> Can't call method "first_token" on an undefined value at
> [..]/Method/Signatures/Parser.pm line 17.
> I was using a script and package that boiled down to the following..
> However now I can't replicate the problem in the cut-down example :/
That problem has been encountered before and somewhat addressed.
It's touchy, and depends on the version of PPI. I believe the root problem is
that PPI can blow over $@. See
Anyhow, work was done on the way exceptions are propagated and $@ is now
protected inside Method::Signatures. There's been a lot of work since the
last stable release. Try the latest from the repository to see if it solves
the problem. It's going to be released shortly.
E: "Would you want to maintain a 5000 line Perl program?"
d: "Why would you write a 5000 line program?"
More information about the Melbourne-pm