Subject: | Error when doing "try" on the same line as "use Exception::SEH" |
This fails:
# perl
use Exception::SEH; try { 1 }
PL_linestr not long enough, was Devel::Declare loaded soon enough in -
at
/usr/local/lib/perl5/site_perl/5.10.1/i386-freebsd/Exception/SEH/Parser.pm
line 139.
This works:
# perl -MCarp::Always
use Exception::SEH;
try { 1 }
It would seem that if you put the try on the same line as the use
statement, you will get an error. That is probably not that big of a
deal until you try using Exception::SEH in a one-liner:
# perl -MCarp::Always -e ' use Exception::SEH; try{1} '
PL_linestr not long enough, was Devel::Declare loaded soon enough in -e
at
/usr/local/lib/perl5/site_perl/5.10.1/i386-freebsd/Exception/SEH/Parser.pm
line 139
Exception::SEH::Parser::substitute('Exception::SEH::Parser=HASH(0x81923f0)',
'(\@_, sub', 0) called at
/usr/local/lib/perl5/site_perl/5.10.1/i386-freebsd/Exception/SEH/Parser.pm
line 116
Exception::SEH::Parser::inject('Exception::SEH::Parser=HASH(0x81923f0)',
'(\@_, sub') called at
/usr/local/lib/perl5/site_perl/5.10.1/i386-freebsd/Exception/SEH.pm line 83
Exception::SEH::parse_try('try', 21) called at
/usr/local/lib/perl5/site_perl/5.10.1/i386-freebsd/Devel/Declare.pm line 274
Devel::Declare::linestr_callback('const', 'try', 21) called at
-e line 1
Note that a work-around solution to the one-liner is:
# perl -MCarp::Always -MException::SEH -e 'try{1} '
So, all in all, this seems to be a very minor bug.