http://qs321.pair.com?node_id=471254


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