home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl_ste.zip / auto / URI / URL / file / dos_path.al < prev    next >
Text File  |  1997-11-28  |  401b  |  18 lines

  1. # NOTE: Derived from ./blib/lib/URI/URL/file.pm.  Changes made here will be lost.
  2. package URI::URL::file;
  3.  
  4. sub dos_path
  5. {
  6.     my $self = shift;
  7.     my @p;
  8.     for ($self->path_components) {
  9.     Carp::croak("Path component contains '/' or '\\'") if m|[/\\]|;
  10.     push(@p, uc $_);
  11.     }
  12.     my $p = join("\\", @p);
  13.     $p =~ s/^\\([A-Z]:)/$1/;  # Fix drive letter specification
  14.     $p;
  15. }
  16.  
  17. 1;
  18.