On Mon, Nov 19, 2001 at 10:11:51PM +0100, Tels wrote:
> oh, related to:
>
> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-11/msg01172.html
>
> ?
Yes. You can pretty much just make them thin wrappers around the
appropriate File::Spec method to preserve the MM interface and mention
that their use is deprecated in favor of File::Spec.
sub canonpath {
return File::Spec->canonpath($_[1]);
}
or if you're feeling really compact
foreach my $meth (qw(canonpath catdir ...)) {
*{__PACKAGE__.'::'.$meth} = sub {
File::Spec->$meth($_[1]);
};
}
but that might be getting a little silly.
This also means you can completely junk all the versions of these
methods in the subclasses. Anything that reduces the size of
MakeMaker has to be a good thing.
> On 19-Nov-01 Tels tried to scribble about:
> [snip]
> > * There are a couple of functions I have tests for, BUT:
> >
> > =item canonpath
> >
> > No physical check on the filesystem, but a logical cleanup of a
> > path. On UNIX eliminated successive slashes and successive "/.".
> >
> > =cut
> >
> > [snip]
> > =item catdir
> >
> > Concatenate two or more directory names to form a complete path
> > ending
> > [snip]
> >
> > etc etc.
> >
> > Shouldn't all these path functions be already somewhere else, f.i. in
> > File::Spec and shouldn't it use File::Spec, simply? Or am I something
> > missing?
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
"Let's face it," said bearded Rusty Simmons, opening a can after the
race. "This is a good excuse to drink some beer." At 10:30 in the
morning? "Well, it's past noon in Dublin," said teammate Mike
[Joseph] Schwern. "It's our duty."
-- "Sure, and It's a Great Day for Irish Runners"
Newsday, Sunday, March 20, 1988