in reply to Re: use and require inside subs
in thread use and require inside subs
I thought I knew this, but why do I put my use statements inside if/then if it happens at compile time?
Too tired to think for myself tonight.use warnings; use strict; my $config; if ($^O eq 'MSWin32') { use Win32::TieRegistry( Delimiter=>"/", ArrayValues=>0 ); # load $config from registry } else { # else load $config from flat files }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: use and require inside subs
by tachyon (Chancellor) on Nov 03, 2004 at 01:00 UTC | |
by halley (Prior) on Nov 03, 2004 at 14:43 UTC | |
by elwarren (Priest) on Nov 03, 2004 at 16:54 UTC | |
Re^3: use and require inside subs
by Ytrew (Pilgrim) on Nov 03, 2004 at 04:15 UTC | |
by ysth (Canon) on Nov 03, 2004 at 07:01 UTC | |
by Anonymous Monk on Nov 03, 2004 at 06:25 UTC | |
by premchai21 (Curate) on Nov 03, 2004 at 07:36 UTC |
In Section
Seekers of Perl Wisdom