develooper Front page | perl.perl5.porters | Postings from September 2003

RE: perl562@20985 [PATCH MakeMaker]

From:
Orton, Yves
Date:
September 8, 2003 10:52
Subject:
RE: perl562@20985 [PATCH MakeMaker]
Message ID:
71B318898201D311845C0008C75DAD1C08961180@defra1ex2
> On Monday, September 8, 2003, at 06:54  AM, Orton, Yves wrote:
> >
> > The best dictionary of known $^O values that I know of is in 
> > File::Spec.
> 
> Actually, I think a better dictionary is in Module::Build, in the 
> top-level module.

Ok, fair enough.
 
> File::Spec already has a path() method that returns a list of path 
> elements.  Looking at the code I inherited though, it doesn't 
> look very robust.  I can patch for better use of $Config{path_sep}.

Ok, the only beef I have with that sub (which is news to me :-) is that it
is intended to work on $ENV{PATH} but really we need a method that can split
appropriately any path on a given platform.

Maybe make it should default to $ENV{PATH} if passed no argument and
otherwise split the string it is passed?

> I don't think it's a good idea to have a pathsep() method, 
> for reasons 
> similar to the ones for not having a dirsep() method ('/', '\', ':', 
> etc.).  Much better to return the data structure itself.

Fair enough.

Yves




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