Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: ML/ did not return a true value

by myocom (Deacon)
on Dec 05, 2002 at 18:22 UTC ( #217841=note: print w/replies, xml ) Need Help??

in reply to ML/ did not return a true value

In short, it sounds like you have a bad version of XML::Twig, and you should grab it from CPAN and reinstall it.

The long answer is that perl modules must end with a true value (most modules simply put 1; at the end), but the XML::Twig that you have installed doesn't do that (which leads me to believe that you have a bogus version). For more information on the whole must-return-a-true-value thing, see perldoc perlmod.

"One word of warning: if you meet a bunch of Perl programmers on the bus or something, don't look them in the eye. They've been known to try to convert the young into Perl monks." - Frank Willison

Replies are listed 'Best First'.
Re: Re: ML/ did not return a true value
by matth (Monk) on Dec 06, 2002 at 15:29 UTC
    I have re-installed it and with the make test command I get the following output (shortened version)
    bash-2.05$ make test cp blib/lib/XML/ PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl +5/5.6.1/i386-linux -I/usr/lib/perl5/5.6.1 -e 'use Test::Harness qw(&r +untests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/is_field..........XML/ did not return a true value at t/is_fi +eld.t line 4. BEGIN failed--compilation aborted at t/is_field.t line 4. t/is_field..........dubious Test returned status 255 (wstat 65280, 0xff00) t/test1.............XML/ did not return a true value at t/test1 +.t line 11. BEGIN failed--compilation aborted at t/test1.t line 11. t/test1.............dubious Test returned status 255 (wstat 65280, 0xff00) t/test2.............XML/ did not return a true value at t/test2 +.t line 10. BEGIN failed--compilation aborted at t/test2.t line 10. t/test2.............dubious Test returned status 255 (wstat 65280, 0xff00) t/test3.............XML/ did not return a true value at t/test3 +.t line 13.
    Interesting problem.
        Warning: prerequisite XML::Parser failed to load: Can't locate XML/Par in @INC (@INC contains: /usr/lib/perl5/5.6.1/i386-linux /usr/l +ib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/per +l5/site_perl/5.6.1 /usr/lib/perl5/site_perl .) at (eval 4) line 3. ... #/usr/bin/perl speedup > Can't locate XML/ in @INC (@INC contains: /usr/lib/perl5/5.6. +1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386 +-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .) at +speedup line 5. BEGIN failed--compilation aborted at speedup line 5. make: *** [] Error 2

        there's your problem right there. It can't load XML::Parser.

        I'm not sure why it can't load it, since it seems to be installed (based on your directory listing) but it appears that you are installing these modules in your own personal directory instead of system wide ... which means that by default, perl scripts you run don't know about it unless you tell them. (in this case, the installer for XML::Twig is trying to run a perl script which is looking for XML::Parser)

        Try setting the PERL5LIB environment variable in your shell to know about your personal CPAN lib directory (see the "I am not root, how can I install a module in a personal directory?" qestion of CPANs docs)

        The only thing i'm not clear on is why perl Makefile.PL didn't die as soon as it couldn't find XML::Parser ... it's clearly marked as a dependancy, and should have given you a usefull error message.

Re: Re: ML/ did not return a true value
by matth (Monk) on Dec 05, 2002 at 19:14 UTC
    Good monks. I have tried again to install it but with the same resulting problem.
    drwxr-xr-x 5 redden redden 4096 Dec 5 20:09 blib -rw-r--r-- 1 redden redden 18377 Nov 2 10:36 Changes -rw-r--r-- 1 redden redden 938 Nov 1 18:44 check_optional +_modules -rw-r--r-- 1 redden redden 18571 Dec 5 20:09 Makefile -rw-r--r-- 1 redden redden 556 Nov 1 18:44 Makefile.PL -rw-r--r-- 1 redden redden 495 Nov 1 18:44 MANIFEST -rw-r--r-- 1 redden redden 2585 Nov 1 18:44 README -rw-r--r-- 1 redden redden 2099 Nov 1 18:44 speedup drwxr-xr-x 2 redden redden 4096 Nov 10 17:17 t -rw-r--r-- 1 redden redden 0 Dec 5 20:09 -rw-r--r-- 1 redden redden 284561 Nov 10 17:17
    Can anyone see any problems with this. Why doesn't the file contain anything?

      What version is this (try perl -MXML::Twig -l -e'print $XML::TWIG::VERSION')? And how are you installing it? Did you do Perl Makefile.PL? should not be empty, but in any case it is generated from (see Speeding-up OO accessor methods for the reason to this).

        I am installing it through the cpan shell. The readme file gives the following version:
        $Id: README,v 1.8 2002/10/20 23:40:09 mrodrigu Exp $
        and ......
        bash-2.05$ perl -MXML::Twig -l -e'print $XML::TWIG::VERSION' XML/ did not return a true value. BEGIN failed--compilation aborted.
        Thanks for your good time.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://217841]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2022-05-29 09:45 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (101 votes). Check out past polls.