On Fri, Aug 30, 2002 at 10:52:15AM +1000, Ken Williams wrote:
> What situation did this turn up in?  It seems like a 
> "garbage-in-garbage-out" situation, and maybe it would be best 
> to just fix the garbage going in.

The original situation was where Bricologe had constructed a PM hash like
this:

     PM => { './Bric/Foo.pm' => '$(INST_LIBDIR)/Bric/Foo.pm',
             './Bric/Bar.pm' => '$(INST_LIBDIR)/Bric/Bar.pm',
           }

as a side-effect of using File::Find which had constructed filenames with
the ./ on front because that's the directory they searched.

The docs just call for filenames.  They don't say anything about them having
to be relative.  I don't think it's garbage.

I'm sure there's a dozen other subtle problems like this lurking around as a
result of having non-canonicalized paths.


> >$ perl5.6.1 -wle 'use File::Spec;  print 
> >File::Spec->catfile("./Foo/Bar.pm")'
> >../Foo/Bar.pm
> 
> I assume you meant to only paste one dot there.

Yep.

> >Since the MakeMaker code assumes the canonicalization will happen this
> >causes subtle problems like man pages with the name .::Foo::Bar.3pm.
> 
> Why is the dot getting there in the first place?

See above.  MakeMaker translates the filepath into a man page name.
Previously it would canonicalize the filepath.  Now it doesn't.


> >Rather than try and go through the code and find all the places 
> >where it's
> >assuming canonicalization will happen, I think I'll just put File::Spec
> >wrappers back into MakeMaker and change all the File::Spec->foo 
> >calls to
> >$self->foo.  Seems like a step backwards after all the work we 
> >did to change over to File::Spec, but oh well.
> 
> Auuughh!  Is changing File::Spec not an option?  It doesn't seem 
> to specify one way or the other what the behavior is supposed to 
> be.

I think it was added to MakeMaker after File::Spec branched off.  Somewhere
between 5.4.5 and 5.5.0.  Here the patch that did it.  #814.
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1998-03/msg00339.html

Looks like Alan snuck it in.

Either way, MakeMaker will still need wrappers to deal with older
File::Specs. :(


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
7.  It is always something
     -- RFC 1925

Reply via email to