summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/h2xs.PL18
1 files changed, 8 insertions, 10 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL
index 7d72e8a1a8..730a730e26 100644
--- a/utils/h2xs.PL
+++ b/utils/h2xs.PL
@@ -630,14 +630,13 @@ warn "Writing $ext$modpname/$modfname.pm\n";
print PM <<"END";
package $module;
-require 5.005_62;
use strict;
END
if( $opt_X || $opt_c || $opt_A ){
# we won't have our own AUTOLOAD(), so won't have $AUTOLOAD
print PM <<'END';
-our @EXPORT_OK;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
END
}
else{
@@ -645,7 +644,7 @@ else{
# will want Carp.
print PM <<'END';
use Carp;
-our @EXPORT_OK;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
END
}
@@ -670,7 +669,7 @@ unless ($opt_A) { # no autoloader whatsoever.
}
# Determine @ISA.
-my $myISA = 'our @ISA = qw(Exporter'; # We seem to always want this.
+my $myISA = '@ISA = qw(Exporter'; # We seem to always want this.
$myISA .= ' DynaLoader' unless $opt_X; # no XS
$myISA .= ');';
print PM "\n$myISA\n\n";
@@ -685,16 +684,16 @@ print PM<<"END";
# This allows declaration use $module ':all';
# If you do not need this, moving things directly into \@EXPORT or \@EXPORT_OK
# will save memory.
-our %EXPORT_TAGS = ( 'all' => [ qw(
+%EXPORT_TAGS = ( 'all' => [ qw(
@exported_names
) ] );
-our \@EXPORT_OK = ( \@{ \$EXPORT_TAGS{'all'} } );
+\@EXPORT_OK = ( \@{ \$EXPORT_TAGS{'all'} } );
+
+\@EXPORT = (
-our \@EXPORT = qw(
- @const_names
);
-our \$VERSION = '$TEMPLATE_VERSION';
+\$VERSION = '$TEMPLATE_VERSION';
END
@@ -705,7 +704,6 @@ 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);