Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 surveying the Monastery: (6)
As of 2015-07-04 18:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls