Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

ML/Twig.pm did not return a true value

by matth (Monk)
on Dec 05, 2002 at 18:17 UTC ( [id://217840]=perlquestion: print w/replies, xml ) Need Help??

matth has asked for the wisdom of the Perl Monks concerning the following question:

Hi everybody, I have another question. What, in a nutshell, does the following error message mean (beyond the obvious) and is there an easy way of overcoming this?
bash-2.05$ perl perl_monks_B.pl XML/Twig.pm did not return a true value at perl_monks_B.pl line 4. BEGIN failed--compilation aborted at perl_monks_B.pl line 4.

Replies are listed 'Best First'.
Re: ML/Twig.pm did not return a true value
by myocom (Deacon) on Dec 05, 2002 at 18:22 UTC

    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
      I have re-installed it and with the make test command I get the following output (shortened version)
      bash-2.05$ make test cp Twig.pm blib/lib/XML/Twig.pm 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/Twig.pm 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/Twig.pm 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/Twig.pm 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/Twig.pm did not return a true value at t/test3 +.t line 13.
      Interesting problem.
      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 Twig.pm -rw-r--r-- 1 redden redden 284561 Nov 10 17:17 Twig.pm.slow
      Can anyone see any problems with this. Why doesn't the Twig.pm 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? Twig.pm should not be empty, but in any case it is generated from Twig.pm.slow (see Speeding-up OO accessor methods for the reason to this).

Re: ML/Twig.pm did not return a true value
by hossman (Prior) on Dec 06, 2002 at 01:35 UTC

    The fact that your version of Twig.pm is zero bytes after intallation is definitely suspicious.

    I for one would be interested if you posted all of the STDIN/STDOUT/STDERR from your CPAN session. (I'm suspect mirod would be interested too.)

    As allways, posting the output of "perl -V" on your system would be useful -- in situations like this where the installation takes divergent paths based on which version of perl you are using, it is ESENTIAL -- in figuring out what is happening.

      Sorry for the delay in the reply. perl -V gives the first line as :
      Summary of my perl5 (revision 5.0 version 6 subversion 1) configuratio +n:
      The first line of the readme for the XML::Twig is:
      $Id: README,v 1.8 2002/10/20 23:40:09 mrodrigu Exp $
      I'm not really sure how to do the following:
      Post all of the STDIN/STDOUT/STDERR from your CPAN session
      Sorry.
        I have now got it working. The problem was due to poor system administration on my part.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://217840]
Approved by myocom
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-24 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found