Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

schwern (1528)

  (email not shown publicly)
AOL IM: MichaelSchwern (Add Buddy, Send Message)

Schwern can destroy CPAN at his whim.

Journal of schwern (1528)

Thursday August 30, 2007
08:23 AM

Blast from the past:

[ #34282 ]

I was bored so I looked through my module list for something that hasn't been updated in a while. hasn't been touched since 2001 and its still a good idea. So I just spiffied it up a little and released 1.00. solves this problem:

require Some::Module;

$Some::Module::Global = 42;

Perl will warn you Name "Some::Module::Global" used only once: possible typo and the usual work around is often something weird like $Some::Module::Global = $Some::Module::Global = 42. Rare but annoying and the work arounds are odd and varied.

Long ago there was a move to patch to accept fully qualified variables but it didn't go through in. So I hacked up instead, stealing liberally from's magic. With you can explicitly declare that you're going to use someone else's variables at compile time so Perl doesn't think you typo'd.

require Some::Module;
use your qw($Some::Module::Global);

$Some::Module::Global = 42;


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.