in reply to Re^18: can't import using exporter
in thread can't import using exporter
Usually a simple alias BEGIN{ *var=\$DEBUG::var}; is what I remember working -- USED it TONS of times.
{ package DEBUG; our $var = 'foo'; } { package main; BEGIN { *var = \$DEBUG::var }; print "Var is $var\n"; } $ perl debug_begin.pl Variable "$var" is not imported at debug_begin.pl line 14. Global symbol "$var" requires explicit package name at debug_begin.pl +line 14. Execution of debug_begin.pl aborted due to compilation errors. $ perl -v This is perl, v5.8.9 built for x86_64-linux
(Hint: our scope in this example and still the mess of compilation time versus run time in your longer example.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^20: can't import using exporter (third package)
by tye (Sage) on Mar 20, 2012 at 19:12 UTC | |
Re^20: can't import using exporter
by perl-diddler (Chaplain) on Mar 24, 2012 at 15:26 UTC | |
by chromatic (Archbishop) on Mar 24, 2012 at 17:27 UTC | |
by perl-diddler (Chaplain) on Mar 24, 2012 at 22:29 UTC | |
by chromatic (Archbishop) on Mar 25, 2012 at 07:30 UTC | |
by perl-diddler (Chaplain) on Apr 25, 2012 at 21:26 UTC | |
| |
by Anonymous Monk on Mar 25, 2012 at 07:23 UTC | |
by perl-diddler (Chaplain) on Mar 26, 2012 at 16:32 UTC | |
|
In Section
Seekers of Perl Wisdom