Liblist finally works
authorIlya Zakharevich <ilya@math.berkeley.edu>
Tue, 21 Nov 2000 22:02:17 +0000 (17:02 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 22 Nov 2000 21:21:46 +0000 (21:21 +0000)
Message-ID: <20001121220217.A24174@monk.mps.ohio-state.edu>

p4raw-id: //depot/perl@7814

lib/ExtUtils/Liblist.pm
lib/ExtUtils/MM_VMS.pm
lib/ExtUtils/MakeMaker.pm

index b22363b..944565a 100644 (file)
@@ -1,5 +1,26 @@
 package ExtUtils::Liblist;
 
+@ISA = qw(ExtUtils::Liblist::Kid File::Spec);
+
+sub lsdir {
+  shift;
+  my $rex = qr/$_[1]/;
+  opendir my $dir, $_[0];
+  grep /$rex/, readdir $dir;
+}
+
+sub file_name_is_absolute {
+  require File::Spec;
+  shift;
+  'File::Spec'->file_name_is_absolute(@_);
+}
+
+
+package ExtUtils::Liblist::Kid;
+
+# This kid package is to be used by MakeMaker.  It will not work if
+# $self is not a Makemaker.
+
 use 5.005_64;
 # Broken out of MakeMaker from version 4.11
 
index 377d5d1..e059d8f 100644 (file)
@@ -151,11 +151,12 @@ sub AUTOLOAD {
 
 
 # This isn't really an override.  It's just here because ExtUtils::MM_VMS
-# appears in @MM::ISA before ExtUtils::Liblist, so if there isn't an ext()
+# appears in @MM::ISA before ExtUtils::Liblist::Kid, so if there isn't an ext()
 # in MM_VMS, then AUTOLOAD is called, and bad things happen.  So, we just
-# mimic inheritance here and hand off to ExtUtils::Liblist.
+# mimic inheritance here and hand off to ExtUtils::Liblist::Kid.
 sub ext {
-  ExtUtils::Liblist::ext(@_);
+  require ExtUtils::Liblist;
+  ExtUtils::Liblist::Kid::ext(@_);
 }
 
 =back
index 64f6986..1ba1825 100644 (file)
@@ -44,7 +44,7 @@ use vars qw(
 # default routine without having to know under what OS
 # it's running.
 #
-@MM::ISA = qw[ExtUtils::MM_Unix ExtUtils::Liblist ExtUtils::MakeMaker];
+@MM::ISA = qw[ExtUtils::MM_Unix ExtUtils::Liblist::Kid ExtUtils::MakeMaker];
 
 #
 # Setup dummy package:
@@ -60,7 +60,7 @@ use vars qw(
 
 # "predeclare the package: we only load it via AUTOLOAD
 # but we have already mentioned it in @ISA
-package ExtUtils::Liblist;
+package ExtUtils::Liblist::Kid;
 
 package ExtUtils::MakeMaker;
 #