develooper Front page | perl.perl5.porters | Postings from November 2000

[PATCH 5.7.0] Liblist finally works

Thread Next
From:
Ilya Zakharevich
Date:
November 21, 2000 19:02
Subject:
[PATCH 5.7.0] Liblist finally works
Message ID:
20001121220217.A24174@monk.mps.ohio-state.edu
This makes ExtUtils;:Liblist to work - at last.

  perl -MExtUtils::Liblist -wle 'print for ExtUtils::Liblist->ext("-lm")'

(I did not check it on Win or on VMS, but I think this change should
fix it.)  I checked that MakeMaker continues to work...

Enjoy,
Ilya

--- ./lib/ExtUtils/Liblist.pm~	Tue Sep 12 09:52:49 2000
+++ ./lib/ExtUtils/Liblist.pm	Tue Nov 21 21:57:24 2000
@@ -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
 
--- ./lib/ExtUtils/MakeMaker.pm~	Sun Oct 22 23:37:18 2000
+++ ./lib/ExtUtils/MakeMaker.pm	Tue Nov 21 17:24:42 2000
@@ -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;
 #
--- ./lib/ExtUtils/MM_VMS.pm~	Wed Oct 25 17:24:40 2000
+++ ./lib/ExtUtils/MM_VMS.pm	Tue Nov 21 17:26:56 2000
@@ -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

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About