home *** CD-ROM | disk | FTP | other *** search
- # NOTE: Derived from ../../lib/DynaLoader.pm.
- # Changes made here will be lost when autosplit again.
- # See AutoSplit.pm.
- package DynaLoader;
-
- #line 288 "../../lib/DynaLoader.pm (autosplit into ../../lib/auto/DynaLoader/dl_expandspec.al)"
- 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 function is designed to deal with systems which treat some
- # 'filenames' in a special way. For example VMS 'Logical Names'
- # (something like unix environment variables - but different).
- # This function should recognise such names and expand them into
- # full file paths.
- # Must return undef if $spec is invalid or file does not exist.
-
- my $file = $spec; # default output to input
-
- if ($Is_VMS) { # dl_expandspec should be defined in dl_vms.xs
- require Carp;
- Carp::croak("dl_expandspec: should be defined in XS file!\n");
- } elsif ($Is_RISCOS) {
- # filename, input conversion, output conversion
- # input conversion uses the "interal" flag setting to go to RISC OS
- # canonicalise then converts logical paths to physical
- # output conversion is turned off
- # result is fully qualified native pathname, which UnixLib's
- # fopen() and stat() will recognises and hence not "riscosify"
- $file = RISCOS::Filespec::canonicalise ($file, &RISCOS::Filespec::convert_internal, RISCOS::Filespec::constant('__RISCOSIFY_NO_PROCESS'));
- } else {
- return undef unless -f $file;
- }
- print STDERR "dl_expandspec($spec) => $file\n" if $dl_debug;
- $file;
- }
-
- # end of DynaLoader::dl_expandspec
- 1;
-