At 11:19 PM -0600 12/27/01, Dave Rolsky wrote:
>On Thu, 27 Dec 2001, Craig A. Berry wrote:
>
>> 1.)  If ExtUtils::MM_VMS no longer inherits from File::Spec, then
>> $self->fixpath() and $self->eliminate_macros() are orphaned.  If
>> these methods are called directly in File::Spec, then their use of
>> the $self object refers to File::Spec rather than MakeMaker, but they
>> have to consider themselves part of MakeMasker to work in the context
>> of MakeMaker.  I've restored the inheritance.
>
>Ugh, that is just unholy.
>
>I think tearing these apart is beyond my ability at this point,
>particularly since I don't know squat about VMS.  And obviously, its
>better to have the EU::MM_VMS stuff work than to have it be pretty ;)
>
>But maybe some Perl VMS person could think about how to do that.  The fact
>that File::Spec::VMS operates differently when called from
>ExtUtils::MakeMaker is very weird.

I think all the methods were part of MakeMaker before File::Spec
existed and the design of MM_VMS grew up around that.  In particular,
eliminate_macros() and fixpath() do things with MakeMaker's %self
array, so when they were moved to File::Spec they had to have a way
of still believing they were part of MakeMaker.  They couldn't be
left in MakeMaker because then File::Spec::VMS would have had to
import MakeMaker and it's considered a real memory hog.

>Also, I see that File::Spec::VMS calls $self->fixpath and
>$self->eliminate_macros in catdir and catfile.  Does that mean that there
>will be other problems when File::Spec->catdir (instead of $self->catdir)
>is called from ExtUtils::MM_VMS?
>
>Or is that what you're describing down below.

Hmm.  That could be the real cause of problem #2 . . .

> > 2.) Under the previous dispensation, $self->catdir was not equivalent to
> > File::Spec->catdir but rather to File::Spec::Unix->catdir. 

> > Basically you end up seeing things like '[.foo$(DIR).bar]' turned
> > into '[.foo[.dir].bar]' and that's not a valid directory spec.

If File::Spec::VMS->catdir and File::Spec::VMS->catfile were
expanding macros as they're supposed to, I don't think we'd see this
problem.   But they can't expand macros when the methods they depend
on to do that (fixpath and eliminate_macros) don't have access to
MM's %self array.  How criminally insane would it be to export that
array into File::Spec?  Hmm.  I think there's a reason the divorce
between MakeMaker and File::Spec has never been settled amicably
before now.

> > BTW, on a related note, I wonder why ExtUtils::Liblist wasn't also
>> changed to use the File::Spec methods instead of the $self methods?
>
>Oversight on my part.  But if I change it now is it going to hose up VMS?
>If not, I'll gladly submit a patch.

No more so than it is already.  If we work out the right way to do
this for MM_VMS, the same thing should work for Liblist.

> > And the patch, which has only been tested on VMS:
>
>Or maybe the chunks of my patch which applied to ExtUtils::MM_VMS should
>just be reverted?

I don't think that will work since we inherit some things from
MM_Unix that have the same problems.
-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to