Subject: | more flexible Mkbootstrap |
While hacking at an Extension, I wanted to just pass through code using
$bscode from the *_BS to the *.bs file - that did not work, because the
@all array was empty. The following patch corrects the problem.
Cheers,
Marek
--- Mkbootstrap.pm.orig 2004-04-22 17:21:52.618068000 +0200
+++ Mkbootstrap.pm 2004-04-29 16:04:50.884816000 +0200
@@ -40,7 +40,7 @@
my(@all) = (@bsloadlibs, @DynaLoader::dl_resolve_using);
my($method) = '';
- if (@all){
+ if (@all || length $DynaLoader::bscode){
open BS, ">$baseext.bs"
or die "Unable to open $baseext.bs: $!";
print STDOUT "Writing $baseext.bs\n";
@@ -49,14 +49,16 @@
print BS "# Do not edit this file, changes will be lost.\n";
print BS "# This file was automatically generated by the\n";
print BS "# Mkbootstrap routine in ExtUtils::Mkbootstrap
(v$VERSION).\n";
- print BS "\@DynaLoader::dl_resolve_using = ";
- # If @all contains names in the form -lxxx or -Lxxx then it's
asking for
- # runtime library location so we automatically add a call to
dl_findfile()
- if (" @all" =~ m/ -[lLR]/){
+ if(@all) {
+ print BS "\@DynaLoader::dl_resolve_using = ";
+ # If @all contains names in the form -lxxx or -Lxxx then it's
asking for
+ # runtime library location so we automatically add a call to
dl_findfile()
+ if (" @all" =~ m/ -[lLR]/){
print BS " dl_findfile(qw(\n @all\n ));\n";
- }else{
+ }else{
print BS " qw(@all);\n";
- }
+ }
+ }
# write extra code if *_BS says so
print BS $DynaLoader::bscode if $DynaLoader::bscode;
print BS "\n1;\n";