in reply to require & $main::variables
is the same as:use foo qw/bar $baz/;
Most errors (not this one, but most) where a require did not do what a use would are missing the import.# Do this at compile time.... BEGIN { # load if needed require foo; # import functionality foo->import('bar', '$baz'); }
UPDATE
As merlyn points out, if your require does not match
what you expected from use, and it wasn't a missing
import, then likely you need the BEGIN block. Or else
(as in this case) it is an unrelated mistake and the
use wouldn't have worked either.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 1: require & $main::variables
by merlyn (Sage) on Apr 04, 2001 at 04:24 UTC |