From: "Piers Cawley" <[EMAIL PROTECTED]>
> Adam Spiers <[EMAIL PROTECTED]> writes:
>
> > Christian Lemburg ([EMAIL PROTECTED]) wrote:
> > >
> > > From: "Adam Spiers" <[EMAIL PROTECTED]>
> > > > Christian Lemburg ([EMAIL PROTECTED]) wrote:
> > > > > Good. What do I need to check out to make the self tests work?
> > > > > I checked it out with 'cvs update -d -r pdc_coderef_inner_class',
> > > > > and make_test fails on two tests.
> > > ...
> > > > Isn't this the same base.pm problem I posted about a few days ago?
If
> > > > you're running Perl < 5.6, try putting the attached base.pm at the
top
> > > > of @INC.
> > >
> > > Yup, that solved it. Thanks.
> > >
> > > Hm, we will have to think about this - a lot of people run on
5.005_03,
> > > since this is the last release of perl that really runs really stable,
and
> > > it still comes prepackaged with a lot of distributions.
> >
> > Nasty, isn't it? Possible workarounds:
> >
> > 1. Document it
> > 2. Get `make install' to check for the brokenness and warn
> > 3. Add `use Foo;' before every `use base qw(Foo);'
> > 4. Provide a patch
> >
> > 3. is the easiest but somehow I don't like it.
>
> 5. Don't use base at all, do:
>
> use vars qw/@ISA/;
> use Foo ();
> @ISA = 'Foo';
>
> After all, it's worked for ages. Ugly though.
That would be my preferred solution.
I did use "use base" because Brian (way back then)
suggested it would be "the new way" to do things.
I don't like it at all, now, after I learned the nasty side of it.
Let's throw it out, and put in the old form (we can do
that with an automatic text replace, can't we).
> Or, in Makefile.PL:
>
> use ExtUtils::MakeMaker;
>
> # See lib/ExtUtils/MakeMaker.pm for details of how to influence
> # the contents of the Makefile that is written.
>
> my $PREREQ_PM;
> unless (eval "require 5.6.0") {
> $PREREQ_PM = {Class::Fields => 0};
> }
> else {
> $PREREQ_PM = {base => 0};
> }
>
>
> WriteMakefile(
> 'NAME' => 'Test::Unit',
> 'VERSION_FROM' => 'lib/Test/Unit.pm', # finds $VERSION
> 'PREREQ_PM' => $PREREQ_PM,
> );
>
> Admittedly, this assumes that the 'base' in Class::Fields on CPAN has
> the bugfix, which someone (without perl 5.6.0) needs to check.
Why rely on that? Where will it break next?
Cheers,
Christian
_______________________________________________
Perlunit-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/perlunit-devel