L
Larry
The following code:
package FooPkg;
use strict;
use Exporter ();
use vars qw/@ISA @EXPORT/;
@ISA = qw/Exporter/;
@EXPORT = qw/$x $y $z/;
use vars @EXPORT;
$x = 5;
produces:
Global symbol "$x" requires explicit package name at FooPkg.pm
line 10.
FooPkg.pm had compilation errors.
However, if I change:
use vars @EXPORT;
to
use vars qw/$x $y $z/;
it works. But I would like to avoid repeating the qw/$x $y $z/ . Why
won't the original version work?
package FooPkg;
use strict;
use Exporter ();
use vars qw/@ISA @EXPORT/;
@ISA = qw/Exporter/;
@EXPORT = qw/$x $y $z/;
use vars @EXPORT;
$x = 5;
produces:
Global symbol "$x" requires explicit package name at FooPkg.pm
line 10.
FooPkg.pm had compilation errors.
However, if I change:
use vars @EXPORT;
to
use vars qw/$x $y $z/;
it works. But I would like to avoid repeating the qw/$x $y $z/ . Why
won't the original version work?