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

Re: minor File::Spec questions

Thread Previous | Thread Next
From:
David Boyce
Date:
August 22, 2001 13:16
Subject:
Re: minor File::Spec questions
Message ID:
4.3.2.20010821082610.01b72848@mail.boyski.com
At 08:21 AM 8/21/2001 -0400, Barrie Slaymaker wrote:
>I think it would be good if perldoc File::Spec gave all the routines'
>names, calling examples, and descriptions.  It's certainly the most
>logical place to look.  Care to patch?  I'm pretty swamped right now...

I'll put it on my list, no promises or dates though.

>It's definitely moot, either way would confuse equal numbers of people
>(both forms are common), and even Ritchie seems to prefer "Unix" these
>days according to lore:
>
>     http://www.unixica.com/html/unixunix.html

Ok.

> > Last, I don't know if this rationalization has been suggested before: it
> > seems to me that File::Spec is the logical place for basename/dirname
> > functions now that it's in the core...
>
>The whole OO interface to File::Spec bugs me, and I still use it out of
>habit when I could use File::Spec::Functions.  I proposed rewriting it
>to be functional with an OO wrapper, but nobody on p5p seemed
>interested, so I haven't bothered.  I did build a large test suite
>(never large enough :-) starting down that path, though.
>
>File::Spec::Functions handles most of the interface needs nicely when
>going for portability (as opposed to cross-platform operation where you
>might want to play with Unix style paths on a Mac, say), and the speed
>of File::Spec just doesn't get complained about.
>
>So, the performance isn't an issue, the functional interface is good
>enough for 99.9% of uses, and fixing what isn't broken is asking for
>instability.

I agree about the weird OO interface but this drifts from my major point. 
Would it not make sense to fold File::Basename into File::Spec and 
deprecate the former while leaving it as a compatibility wrapper?

Thanks,
-David


Thread Previous | Thread Next


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