integrate cfgperl contents into mainline; resolve h2xs.PL conflict
Gurusamy Sarathy [Fri, 1 Oct 1999 22:33:02 +0000 (22:33 +0000)]
by declaring new globals "our" (XXX this means h2xs generated code
won't run on earlier versions; a switch to generate compatible
source is needed)

p4raw-id: //depot/perl@4271

perlapi.c [changed mode: 0755->0644]
perlapi.h [changed mode: 0755->0644]
t/op/filetest.t [changed mode: 0644->0755]
t/op/subst_amp.t [changed mode: 0644->0755]
utils/h2xs.PL

old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index a9b8826..b3031c3 100644 (file)
@@ -627,13 +627,14 @@ 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';
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+our @EXPORT_OK;
 END
 }
 else{
@@ -641,7 +642,7 @@ else{
        # will want Carp.
        print PM <<'END';
 use Carp;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
+our @EXPORT_OK;
 END
 }
 
@@ -666,7 +667,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";
@@ -681,16 +682,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.
-%EXPORT_TAGS = ( 'all' => [ qw(
+our %EXPORT_TAGS = ( 'all' => [ qw(
        @exported_names
 ) ] );
 
-\@EXPORT_OK = ( \@{ \$EXPORT_TAGS{'all'} } );
-
-\@EXPORT = (
+our \@EXPORT_OK = ( \@{ \$EXPORT_TAGS{'all'} } );
 
+our \@EXPORT = qw(
+       @const_names
 );
-\$VERSION = '$TEMPLATE_VERSION';
+our \$VERSION = '$TEMPLATE_VERSION';
 
 END
 
@@ -701,6 +702,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);