diff options
author | Larry Wall <larry@wall.org> | 1999-09-24 14:59:37 -0700 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-09-25 06:44:47 +0000 |
commit | 77ca0c92d2c0e47301d906d355d9ab3afb6f6bcb (patch) | |
tree | b60e0c33e2b10b0977fb99fb6da0dcad45134146 /utils/h2xs.PL | |
parent | 84e30d1a3b7cc368d7f93dd2b009e9fd64756759 (diff) | |
download | perl-77ca0c92d2c0e47301d906d355d9ab3afb6f6bcb.tar.gz |
Re: [PATCH 5.005_61] "our" declarations
Message-Id: <199909250459.VAA27506@kiev.wall.org>
p4raw-id: //depot/perl@4227
Diffstat (limited to 'utils/h2xs.PL')
-rw-r--r-- | utils/h2xs.PL | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL index bd0ba16f46..ae266de3cb 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -417,7 +417,7 @@ END if( $opt_X || $opt_c || $opt_A ){ # we won't have our own AUTOLOAD(), so won't have $AUTOLOAD print PM <<'END'; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); +our @EXPORT_OK; END } else{ @@ -425,7 +425,7 @@ else{ # will want Carp. print PM <<'END'; use Carp; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); +our @EXPORT_OK; END } @@ -450,7 +450,7 @@ unless ($opt_A) { # no autoloader whatsoever. } # Determine @ISA. -my $myISA = '@ISA = qw(Exporter'; # We seem to always want this. +my $myISA = 'our @ISA = qw(Exporter'; # We seem to always want this. $myISA .= ' DynaLoader' unless $opt_X; # no XS $myISA .= ');'; print PM "\n$myISA\n\n"; @@ -459,10 +459,10 @@ print PM<<"END"; # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. -\@EXPORT = qw( +our \@EXPORT = qw( @const_names ); -\$VERSION = '$TEMPLATE_VERSION'; +our \$VERSION = '$TEMPLATE_VERSION'; END @@ -473,6 +473,7 @@ sub AUTOLOAD { # to the AUTOLOAD in AutoLoader. my \$constname; + our $AUTOLOAD; (\$constname = \$AUTOLOAD) =~ s/.*:://; croak "&$module::constant not defined" if \$constname eq 'constant'; my \$val = constant(\$constname, \@_ ? \$_[0] : 0); |