Portability tweak.
[p5sagit/p5-mst-13.2.git] / ext / DynaLoader / DynaLoader_pm.PL
index 266c9d0..68cf145 100644 (file)
@@ -80,8 +80,10 @@ $Is_MacOS  = $^O eq 'MacOS';
 @dl_require_symbols = ();       # names of symbols we need
 @dl_resolve_using   = ();       # names of files to link with
 @dl_library_path    = ();       # path to look for files
-@dl_librefs         = ();       # things we have loaded
-@dl_modules         = ();       # Modules we have loaded
+
+#XSLoader.pm may have added elements before we were required
+#@dl_librefs         = ();       # things we have loaded
+#@dl_modules         = ();       # Modules we have loaded
 
 # This is a fix to support DLD's unfortunate desire to relink -lc
 @dl_resolve_using = dl_findfile('-lc') if $dlsrc eq "dl_dld.xs";
@@ -244,8 +246,8 @@ sub bootstrap {
        chop($_ = VMS::Filespec::unixpath($_)) if $Is_VMS;
        my $dir;
        if ($Is_MacOS) {
-           chop $_  if /:$/;
-           $dir = "$_:auto:$modpname";
+           $_ .= ":"  unless /:$/;
+           $dir = "${_}auto:$modpname";
        } else {
            $dir = "$_/auto/$modpname";
        }