Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Test::Exception error on Strawberry Perl 5.14.3 ('Bareword "xception" ...')

by ikegami (Pope)
on Jul 29, 2015 at 15:18 UTC ( #1136754=note: print w/replies, xml ) Need Help??


in reply to Re^2: Test::Exception error on Strawberry Perl 5.14.3 ('Bareword "xception" ...')
in thread Test::Exception error on Strawberry Perl 5.14.3 ('Bareword "xception" ...')

It's part of the handling of #! lines. Perl reads a block, then tries to undo the read, but it doesn't have all the necessary information to do so, so it guesses. The end result is that it thinks the file is

xception; use Test::Builder; use Sub::Uplevel qw( uplevel ); use base qw( Exporter ); ...
instead of
use strict; use warnings; package Test::Exception; use Test::Builder; use Sub::Uplevel qw( uplevel ); use base qw( Exporter ); ...

Or something like that. There are holes in that explanation. For example, how could strict subs be on when it encountered "xception"? But while I can't quite explain the result in this specific case, I'm quite sure about the cause. If I'm wrong, well, I only wasted a minute of your time. Did you try my fix?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1136754]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2019-07-19 14:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?