I'm trying to run an existing application on 5.10 for the first time (5.10.0 for right now) and am getting a warning that is not making it easy for me to track down. Any help from the lazy web would be appreciated.
It goes like this:
Variable "$x" is not available at (re_eval 1070) line 1.
$SIG{__WARN__} = \*Carp::cluck;
Re:The code knows
mpeters on 2009-09-16T13:52:10
Yeah, I was also able to trace where in the *perl* code the warning was coming from, but I'm trying to figure out which *module* in the huge tree of modules being used is using a construct that is causing the warning to be thrown.
$bal = qr[(?:(?>[^()]+)|\((??{ $bal })\))*]; # ()-balanced
$cast = qr[(?:\(\s*SV\s*\*\s*\)\s*)?]; # Optional (SV*) cast
$size = qr[,\s* (??{ $bal }) ]x; # Third arg (to setpvn)
Again, IIRC, my temporary workaround was to declare $bal as 'our' rather than 'my'. But since my work on this module has stalled, I can't offer any better insight. Note that 'perldoc perldiag' hints at this being a closure-related problem
Thank you very much.
kid51
Re: Help needed on a new 5.10 warning
mpeters on 2009-09-17T13:03:57
Thanks for the advice. I eventually tracked it down to Regexp::Common and was able to remove the warning if I just imported the number specific regexes:
use Regexp::Common qw(number);
I've found success with the Carp::Always module. All I have to do is say "use Carp::Always" at the top of my program, and any time an exception is thrown it includes a stack trace, which is great for diagnosing all the exceptions from 'use strict' or 'use warnings fatal'. That said it
Re:try Carp::Always module
bart on 2009-09-17T17:41:29
I hope using-MCarp::Always
on the command line has the same effect as editinguse Carp::Always;
into the code?Re:try Carp::Always module
duncand on 2009-09-17T18:17:55
I found that the effects of 'use Carp::Always' are global in scope, so I assume that loading it with -M on the command line will work as well as placement into code.