Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Can I force strictness on included files?

by broquaint (Abbot)
on Jun 30, 2005 at 08:59 UTC ( #471254=note: print w/replies, xml ) Need Help??


in reply to Can I force strictness on included files?

If you're not adverse to a little module usage then Module::Locate can help you out:
use Module::Locate 'get_source'; sub use_mod_strictly { my $mod = shift; my $ret = eval "use strict; " . get_source($mod); die $@ if $@; return $ret; }
So this will grab the source of $mod (and populate %INC), add strictness to the source and finally evaluate the new strict source, checking eval for errors too.
HTH

_________
broquaint

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://471254]
help
Chatterbox?
[Discipulus]: marto apotropaic gestures in Eataly..
[Discipulus]: LanX nick does not downvote peoples, just content he dislike (I think)
[Discipulus]: anyway I have my Tk toys running at 50%!! someone want to see it?
[LanX]: disc+ true every node authored by me or mentioning Perl 6 ;)
[Discipulus]: naahh..
[LanX]: oh a tunnel ...
LanX ducks!

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2018-04-26 10:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?