in reply to Re: Re: use strict;,$main::, and AUTOLOAD: Why can't we all get along?
in thread use strict;,$main::, and AUTOLOAD: Why can't we all get along?
Of course, your code is probably much more complex. Still, no warnings, and you can even use closures.sub maker { no strict 'refs'; foreach my $func (qw[ foo bar baz ]) { *{"Foo::$func"} = sub { $func }; } } maker(); print join(',', Foo::foo(), Foo::bar(), Foo::baz()),"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^3: use strict;,$main::, and AUTOLOAD: Why can't we all get along?
by hsmyers (Canon) on Jul 18, 2002 at 13:39 UTC |