"Fossies" - the Fresh Open Source Software Archive

Member "install-tl-20200916/tlpkg/tlperl/site/lib/URI/file/OS2.pm" (10 Mar 2019, 561 Bytes) of package /windows/misc/install-tl.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 package URI::file::OS2;
    2 
    3 use strict;
    4 use warnings;
    5 
    6 use parent 'URI::file::Win32';
    7 
    8 our $VERSION = '1.76';
    9 
   10 # The Win32 version translates k:/foo to file://k:/foo  (?!)
   11 # We add an empty host
   12 
   13 sub _file_extract_authority
   14 {
   15     my $class = shift;
   16     return $1 if $_[0] =~ s,^\\\\([^\\]+),,;  # UNC
   17     return $1 if $_[0] =~ s,^//([^/]+),,;     # UNC too?
   18 
   19     if ($_[0] =~ m#^[a-zA-Z]{1,2}:#) {        # allow for ab: drives
   20     return "";
   21     }
   22     return;
   23 }
   24 
   25 sub file {
   26   my $p = &URI::file::Win32::file;
   27   return unless defined $p;
   28   $p =~ s,\\,/,g;
   29   $p;
   30 }
   31 
   32 1;