On Wed, Apr 24, 2002 at 10:43:36AM +1000, Ken Williams wrote:
> >requiring ExtUtils::MakeMaker.  MM is one thing.  MY is just Wrong.
> 
> How is anybody supposed to know that?  The docs give examples like this:
> 
>                package MY; # so that "SUPER" works right
>                sub c_o {
>                    my $inherited = shift->SUPER::c_o(@_);
>                    $inherited =~ s/old text/new text/;
>                    $inherited;
>                }
> 
> So one might reasonably expect that 'MY' is a valid subclass name that 
> will get you access to the MakeMaker methods.

"...you may define private subroutines in the Makefile.PL"
                                       ^^^^^^^^^^^^^^^^^^

Docs aren't perfect, but I can't possibly see how the "Overriding MakeMaker
Methods" docs gives license to do:

    my $MM = bless {} => 'MY';
    ...
    my($extralibs, $bsloadlibs, $ldloadlibs, $ld_run_path) =
        $MM->ext(join ' ', "-L$lpath", $libperl, @potential_libs);
            
You don't just bless hashes directly into classes that might vaguely exist
without some knowledge that you're doing naughty things.

That code was likely written years and years ago anyway.

The Real Problem here being that the only way to get at
ExtUtils::Liblist->ext() is with a MakeMaker object.  But ExtUtils::Liblist
does almost nothing with that object and really should be it's own stand
alone thing.  This is something I'd planned to fix when I first took apart
the MakeMaker hierarchy but never bothered.  I doubt it will be fixed before
MakeMaker is mothballed.


> >Without getting into detail, the proper solution is that ExtUtils::Embed
> >will have to be upgraded along with ExtUtils::MakeMaker.  Unfortunately,
> >there is not yet a CPAN version of ExtUtils::Embed.
> 
> If so, it needs to be added to the PREREQ.  Otherwise you'll unwittingly 
> break EU::Embed when you install EU::MM.

there is not yet a CPAN version of ExtUtils::Embed.
      ^^^^^^^^^^

and unfortunately, IIRC, there's no plans for one.  So we'll just hold the
old MY conventions together for a while longer.


> >Meantime, I can hack MakeMaker so that MY exists when 
> >ExtUtils::MakeMaker is
> >loaded.
> >
> >Ken, try the snapshot.
> 
> Yeah, I was going to send you a patch with this same fix.  Here are some 
> tests for it too.

Thanks, something similar is already in as backwards.t.  Sorry for the
overlap.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
"In my day, we didn't have none of yer new-fangled token-pasting
operators!  We stuck the tokens together with our BARE HANDS and we
LIKED IT."
        --  Mark-Jason Dominus fondly remembers perl 1.0
                in <[EMAIL PROTECTED]>

Reply via email to