[PATCH 6.54] NO_XS on OS/2

Ilya Zakharevich <[email protected]> Wed, 5 Aug 2009 09:54:09 -0700
Newsgroups gmane.comp.lang.perl.modules.extutils-makemaker.devel
Message-ID <[email protected]>
I have no idea how it managed to work with miniperl, but perl build
process works OK.  However, NO_XS test notices that MM_OS2 has a
glob() call, thus requires File::Glob, thus requires XS present...

The following patch fixes this:

--- ./lib/ExtUtils/MM_OS2.pm.orig	Tue Jul  7 16:49:04 2009
+++ ./lib/ExtUtils/MM_OS2.pm	Wed Aug  5 09:29:58 2009
@@ -83,7 +83,8 @@ $self->{BASEEXT}.def: Makefile.PL
 	# print "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp\n";
 	system "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp" 
 	    and die "Cannot make import library: $!, \$?=$?";
-	unlink <tmp_imp/*>;
+	# May be running under miniperl, so have no glob...
+	eval "unlink <tmp_imp/*>; 1" or system "rm tmp_imp/*";
 	system "cd tmp_imp; $Config::Config{ar} x ../tmpimp$Config::Config{lib_ext}" 
 	    and die "Cannot extract import objects: $!, \$?=$?";      
     }

Thanks for the tests,
Ilya