home *** CD-ROM | disk | FTP | other *** search
/ CLIX - Fazer Clix Custa Nix / CLIX-CD.cdr / mac / lib / auto / DynaLoader / dl_expandspec.al < prev    next >
Text File  |  1998-04-04  |  1KB  |  30 lines

  1. # NOTE: Derived from wintermute:Development:MacPerl:perl:lib:DynaLoader.pm.  Changes made here will be lost.
  2. package DynaLoader;
  3.  
  4. sub dl_expandspec {
  5.     my($spec) = @_;
  6.     # Optional function invoked if DynaLoader.pm sets $do_expand.
  7.     # Most systems do not require or use this function.
  8.     # Some systems may implement it in the dl_*.xs file in which case
  9.     # this autoload version will not be called but is harmless.
  10.  
  11.     # This function is designed to deal with systems which treat some
  12.     # 'filenames' in a special way. For example VMS 'Logical Names'
  13.     # (something like unix environment variables - but different).
  14.     # This function should recognise such names and expand them into
  15.     # full file paths.
  16.     # Must return undef if $spec is invalid or file does not exist.
  17.  
  18.     my $file = $spec; # default output to input
  19.  
  20.     if ($Is_VMS) { # dl_expandspec should be defined in dl_vms.xs
  21.         Carp::croak("dl_expandspec: should be defined in XS file!\n");
  22.     } else {
  23.         return undef unless -f $file;
  24.     }
  25.     print STDERR "dl_expandspec($spec) => $file\n" if $dl_debug;
  26.     $file;
  27. }
  28.  
  29. 1;
  30.