Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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


Comment on Re: Can I force strictness on included files?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-07-29 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls