home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _9bbca82538c1964578c587a898dcfa13 < prev    next >
Text File  |  2004-06-01  |  491b  |  24 lines

  1. package URI::file::FAT;
  2.  
  3. require URI::file::Win32;
  4. @ISA=qw(URI::file::Win32);
  5.  
  6. sub fix_path
  7. {
  8.     shift; # class
  9.     for (@_) {
  10.     # turn it into 8.3 names
  11.     my @p = map uc, split(/\./, $_, -1);
  12.     return if @p > 2;     # more than 1 dot is not allowed
  13.     @p = ("") unless @p;  # split bug? (returns nothing when splitting "")
  14.     $_ = substr($p[0], 0, 8);
  15.         if (@p > 1) {
  16.         my $ext = substr($p[1], 0, 3);
  17.         $_ .= ".$ext" if length $ext;
  18.     }
  19.     }
  20.     1;  # ok
  21. }
  22.  
  23. 1;
  24.