develooper Front page | perl.perl5.porters | Postings from December 2001

More on MM_* and File::Spec

From:
Dave Rolsky
Date:
December 22, 2001 15:30
Subject:
More on MM_* and File::Spec
Message ID:
Pine.LNX.4.43.0112221723480.16348-100000@urth.org
There's also some File::Spec functions in ExtUtils::MM_NW5 but there's no
File::Spec::NW5.  MM_NW5 defines ...

- catdir()

- file_name_is_absolute(), but this seems identical to the one in
File::Spec::Win32

- path(), also identical to File::Spec::Win32

- canonpath(), substantially similar to File::Spec::Win32 and probably is
an older, buggier version of the Win32 method except that this one has the
line:

      $path .= '.' if $path =~ m#\\$#;

This is in addition to what File::Spec::Win32 does.  I'm not sure what
meaning this has, if any, under Netware.


So it seems like there needs to be a File::Spec::NW5 that subclasses
File::Spec::Win32 and defines catdir()  and _maybe_ has a canonpath like
this:

 sub canonpath {
     my $class = shift;
     my $path = $class->SUPER::canonpath(@_);
     $path .= '.' if $path =~ m#\\$#; # um, \Z instead of $ ??
     return $path
 }





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About