perl 5.003_07: lib/ExtUtils/xsubpp
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / Mksymlists.pm
index aa21f43..0f9a132 100644 (file)
@@ -3,16 +3,15 @@ use strict qw[ subs refs ];
 # no strict 'vars';  # until filehandles are exempted
 
 use Carp;
-use Config;
 use Exporter;
-# mention vars twice to prevent single-use warnings
-@ExtUtils::Mksymlists::ISA = @ExtUtils::Mksymlists::ISA = 'Exporter';
-@ExtUtils::Mksymlists::EXPORT = @ExtUtils::Mksymlists::EXPORT = '&Mksymlists';
-$ExtUtils::Mksymlists::VERSION = $ExtUtils::Mksymlists::VERSION = '1.00';
+use vars qw( @ISA @EXPORT $VERSION );
+@ISA = 'Exporter';
+@EXPORT = '&Mksymlists';
+$VERSION = substr q$Revision: 1.12 $, 10;
 
 sub Mksymlists {
     my(%spec) = @_;
-    my($osname) = $Config{'osname'};
+    my($osname) = $^O;
 
     croak("Insufficient information specified to Mksymlists")
         unless ( $spec{NAME} or
@@ -41,6 +40,7 @@ sub Mksymlists {
     }
 
 #    We'll need this if we ever add any OS which uses mod2fname
+#    not as pseudo-builtin.
 #    require DynaLoader;
     if (defined &DynaLoader::mod2fname and not $spec{DLBASE}) {
         $spec{DLBASE} = DynaLoader::mod2fname([ split(/::/,$spec{NAME}) ]);
@@ -96,7 +96,10 @@ while (($name, $exp)= each %{$data->{IMPORTS}}) {
 
 sub _write_vms {
     my($data) = @_;
-    my($isvax) = $Config{'arch'} =~ /VAX/i;
+
+    require Config; # a reminder for once we do $^O
+
+    my($isvax) = $Config::Config{'arch'} =~ /VAX/i;
     my($sym);
 
     rename "$data->{FILE}.opt", "$data->{FILE}.opt_old";
@@ -127,7 +130,7 @@ sub _write_vms {
     # extliblist routine.
     open OPT,'>rtls.opt';
     print OPT "PerlShr/Share\n";
-    foreach $rtl (split(/\s+/,$Config{'libs'})) { print OPT "$rtl\n"; }
+    foreach $rtl (split(/\s+/,$Config::Config{'libs'})) { print OPT "$rtl\n"; }
     close OPT;
 }
 
@@ -150,7 +153,7 @@ ExtUtils::Mksymlists - write linker options files for dynamic extension
 =head1 DESCRIPTION
 
 C<ExtUtils::Mksymlists> produces files used by the linker under some OSs
-during the creation of shared libraries for synamic extensions.  It is
+during the creation of shared libraries for dynamic extensions.  It is
 normally called from a MakeMaker-generated Makefile when the extension
 is built.  The linker option file is generated by calling the function
 C<Mksymlists>, which is exported by default from C<ExtUtils::Mksymlists>.
@@ -169,8 +172,8 @@ from which it is usually taken.  Its value is a reference to an
 associative array, in which each key is the name of a package, and
 each value is an a reference to an array of function names which
 should be exported by the extension.  For instance, one might say
-C<DL_FUNCS => { Homer::Iliad   => [ qw(trojans greeks) ],
-Homer::Odyssey => [ qw(travellers family suitors) ] }>.  The
+C<DL_FUNCS =E<gt> { Homer::Iliad   =E<gt> [ qw(trojans greeks) ],
+Homer::Odyssey =E<gt> [ qw(travellers family suitors) ] }>.  The
 function names should be identical to those in the XSUB code;
 C<Mksymlists> will alter the names written to the linker option
 file to match the changes made by F<xsubpp>.  In addition, if
@@ -221,4 +224,4 @@ Charles Bailey I<E<lt>bailey@genetics.upenn.eduE<gt>>
 
 =head1 REVISION
 
-Last revised 14-Jan-1996, for Perl 5.002.
+Last revised 14-Feb-1996, for Perl 5.002.