weirdness with CPAN modules that use Data::Dumper

weirdness with CPAN modules that use Data::Dumper

am 30.06.2007 08:34:06 von Joseph Brenner

I've got a CPAN module I've written that has Data::Dumper
listed in PREREQ_PM, because it has some tests that use it.
These tests are failing with this odd message:

t/relate...........Can't load '/home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/aut o/Data/Dumper/Dumper.so' for module Data::Dumper: /home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/auto /Data/Dumper/Dumper.so: undefined symbol: PL_sv_undef at /home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/XSLo ader.pm line 70.
at /home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/Data /Dumper.pm line 36
Compilation failed in require at /home/david/_/_/perl-5.8.8/.cpan/build/App-Relate-0.03-4hkFG t/t/../relate line 44.

Any clues as to what this might be about?

Re: weirdness with CPAN modules that use Data::Dumper

am 30.06.2007 14:18:07 von paduille.4061.mumia.w+nospam

On 06/30/2007 01:34 AM, Joseph Brenner wrote:
> I've got a CPAN module I've written that has Data::Dumper
> listed in PREREQ_PM, because it has some tests that use it.
> These tests are failing with this odd message:
>
> t/relate...........Can't load '/home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/aut o/Data/Dumper/Dumper.so' for module Data::Dumper: /home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/auto /Data/Dumper/Dumper.so: undefined symbol: PL_sv_undef at /home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/XSLo ader.pm line 70.
> at /home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/Data /Dumper.pm line 36
> Compilation failed in require at /home/david/_/_/perl-5.8.8/.cpan/build/App-Relate-0.03-4hkFG t/t/../relate line 44.
>
> Any clues as to what this might be about?
>

App::Relate is the most difficult CPAN module I've ever installed. It
has many dependencies, and one of those (Test::File::Contents) uses
Module::Build. My CPAN doesn't do Module::Build, so I had to delve into
the swamp myself.

Your module builds, tests and installs correctly after its many
prerequisites are installed. Maybe you have two different versions of
Data::Dumper or two different versions of Perl installed, and they are
conflicting.

Data::Dumper, strict, warnings, Env, FindBin, Carp, and File::Copy are
parts of Perl 5.8.8. AFAIK, you don't need to list them in PREREQ_PM if
you "use" the right version of Perl.

Re: weirdness with CPAN modules that use Data::Dumper

am 25.07.2007 22:00:47 von Joseph Brenner

"Mumia W." writes:

> On 06/30/2007 01:34 AM, Joseph Brenner wrote:
>> I've got a CPAN module I've written that has Data::Dumper
>> listed in PREREQ_PM, because it has some tests that use it.
>> These tests are failing with this odd message:
>>
>> t/relate...........Can't load '/home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/aut o/Data/Dumper/Dumper.so' for module Data::Dumper: /home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/auto /Data/Dumper/Dumper.so: undefined symbol: PL_sv_undef at /home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/XSLo ader.pm line 70.
>> at /home/david/cpantesting/perl-5.8.8/lib/5.8.8/i686-linux/Data /Dumper.pm line 36
>> Compilation failed in require at /home/david/_/_/perl-5.8.8/.cpan/build/App-Relate-0.03-4hkFG t/t/../relate line 44.
>>
>> Any clues as to what this might be about?

> App::Relate is the most difficult CPAN module I've ever
> installed. It has many dependencies, and one of those
> (Test::File::Contents) uses Module::Build. My CPAN doesn't do
> Module::Build, so I had to delve into the swamp myself.

Sorry about that. To some extent it was a design decision
on my part to not worry about adding dependencies.
I figured CPANPLUS was probably good enough to take care of
them these days.

But I do agree that the whole system is a bit of a mess
(the finished product, the "relate" script is a little slower
than I'd like) and could probably use some re-thinking.

And Test::File::Contents is a module I've soured on for other reasons
(it doesn't give you enough context about the reason for a
failure to be worth the small convenience). I'll probably drop
it from future releases.

> Your module builds, tests and installs correctly after its many
> prerequisites are installed. Maybe you have two different
> versions of Data::Dumper or two different versions of Perl
> installed, and they are conflicting.

The error isn't happening on my machine. It's an automatic
failure report from the cpan-testers. Perhaps I should send a
note to "cpan-testers@perl.org" (or even "david@cantrell.org.uk"
about it)...

> Data::Dumper, strict, warnings, Env, FindBin, Carp, and
> File::Copy are parts of Perl 5.8.8. AFAIK, you don't need to list
> them in PREREQ_PM if you "use" the right version of Perl.

My understanding is that it's best to list everything in
PREREQ_PM to cover odd situations where an installation has
choosen not to include all of the standard library.

One thing I've been playing with though is to avoid doing "use
Data::Dumper", instead I do requires of it, but only if the
$DEBUG flag has been turned on. Arguably I could just drop it
from PREREQ_PM since in normal use it won't be needed...