summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2011-02-18 18:52:53 -0600
committerCraig A. Berry <craigberry@mac.com>2011-02-18 22:35:29 -0600
commit5477b9a189e12ee6fdd32441a015bb87802a99f2 (patch)
tree1389ba085a5cae17a897d95a8bb9b8c727cf3fe5 /ext
parentea592722d0bf74d1b7b0f84e033462d8a79a3b1c (diff)
downloadperl-5477b9a189e12ee6fdd32441a015bb87802a99f2.tar.gz
Dispatch dl_expandspec at build time, not run time.
Before 0a0b6c96e6042658aa123b3990724be593a2bb63, dl_expandspec was an autoloaded function that would never be called if an XS version was already loaded. Without autoloading in DynaLoader anymore, the pure Perl version gets loaded first, which causes trouble if the XS version is what's expected. It looks as though VMS is the only platform that has an XS version, so just avoid declaring the Perl version there.
Diffstat (limited to 'ext')
-rw-r--r--ext/DynaLoader/DynaLoader_pm.PL12
1 files changed, 5 insertions, 7 deletions
diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL
index 0088851698..91cf080e1e 100644
--- a/ext/DynaLoader/DynaLoader_pm.PL
+++ b/ext/DynaLoader/DynaLoader_pm.PL
@@ -484,12 +484,15 @@ sub dl_findfile {
}
+<<$^O-eq-VMS>>
+# dl_expandspec should be defined in dl_vms.xs
+<<|$^O-eq-VMS>>
sub dl_expandspec {
my($spec) = @_;
# Optional function invoked if DynaLoader.pm sets $do_expand.
# Most systems do not require or use this function.
# Some systems may implement it in the dl_*.xs file in which case
- # this autoload version will not be called but is harmless.
+ # this Perl version should be excluded at build time.
# This function is designed to deal with systems which treat some
# 'filenames' in a special way. For example VMS 'Logical Names'
@@ -500,16 +503,11 @@ sub dl_expandspec {
my $file = $spec; # default output to input
- <<$^O-eq-VMS>>
- # dl_expandspec should be defined in dl_vms.xs
- require Carp;
- Carp::croak("dl_expandspec: should be defined in XS file!\n");
- <<|$^O-eq-VMS>>
return undef unless -f $file;
- <</$^O-eq-VMS>>
print STDERR "dl_expandspec($spec) => $file\n" if $dl_debug;
$file;
}
+<</$^O-eq-VMS>>
sub dl_find_symbol_anywhere
{