On Mon, Nov 25, 2002 at 10:56:07PM -0600, Craig A. Berry wrote:
> >Unless I hear protests otherwise, I'm going to copy them into
> >ExtUtils::MM_VMS and deprecate the versions in File::Spec::VMS. I don't
> >think they're used outside of MakeMaker, I'm currently scanning CPAN to
> >check.
>
> My memory, not necessarily complete or correct, is that nearly all of
> what is now File::Spec -- not just fixpath() and eliminate_macros()
> -- used to be part of MakeMaker.
Yep.
> As various bits of MM got broken
> off and put into File::Spec, fixpath() and eliminate_macros() moved
> with them because there were so many references to things like
> $self->fixpath() and the object inheritance got too complicated if
> you had MM invoking File::Spec invoking MM.
At this point, outside of eliminate_macros() and fixpath() themselves,
catfile() and catdir() are the only places using them. So we may be able to
seperate them.
> What would be ideal is if the methods in File::Spec would only invoke
> these MM-only methods if they had been called from MM.
That's easy, stick:
return $path unless $self->isa('ExtUtils::MakeMaker');
in fixpath() and eliminate_macros(). Though that's < ideal.
What would be ideal is if we could have MM override catdir() and catfile()
and perform the fixpath/eliminate_macro mumbo jumbo on the input/output of
File::Spec's methods rather than doing it inside File::Spec.
Lemme make sure I understand why fixpath() and eliminate_macros() are
necessary. eliminate_macros() takes something like this:
$self->{PREFIX} = '[this.that]';
$self->{FOO} = '[foo.bar]';
print $self->eliminate_macros('$(PREFIX)$(FOO)');
and makes it come out like '/this/that/foo/bar'? This is necessary because
a lot of the work normally done by shell commands from the Makefile on Unix
(and thus macros are expanded) is done inside MM_VMS?
And fixpath()... I don't really get how fixpath() is different from
eliminate_macros().
> If this hasn't completely confused you, you
> are probably uniquely qualified to fix this mess ;-).
This is nothing. You should look at the MakeMaker linker code. *shudder*
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
Shrtr is btr.
-- Abhijit Menon-Sen in <[EMAIL PROTECTED]>