petdance has asked for the wisdom of the Perl Monks concerning the following question:
It lives in a package, but it's automatically exported. Now, since $a and $b live in main::, I have to explicitly look them up in that package.our %df_keys; sub directories_first { return ($df_keys{$main::a}||=df_key($main::a)) cmp ($df_keys{$main +::b} ||= df_key($main::b)); }
Or do I? Is there another way to say "Hey, $a and $b are in main::"?
xoxo,
Andy
--
<megaphone>
Throw down the gun and tiara and come out of the float!
</megaphone>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: Specifying main:: scope
by Ovid (Cardinal) on Dec 05, 2001 at 03:23 UTC | |
|
Re: Specifying main:: scope
by wog (Curate) on Dec 05, 2001 at 03:16 UTC | |
|
Re: Specifying main:: scope
by runrig (Abbot) on Dec 05, 2001 at 03:47 UTC | |
by dragonchild (Archbishop) on Dec 05, 2001 at 18:42 UTC | |
by runrig (Abbot) on Dec 05, 2001 at 21:54 UTC | |
|
Re: Specifying main:: scope
by chip (Curate) on Dec 05, 2001 at 06:04 UTC | |
by blakem (Monsignor) on Dec 05, 2001 at 06:12 UTC |