Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Yet another module installation issue

by bradcathey (Prior)
on Dec 15, 2005 at 15:27 UTC ( #516978=perlquestion: print w/replies, xml ) Need Help??

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

Fellow Monastians,

Tried to install CGI::Application::Plugin::Session on my Pair server today. Got the following error:

%perl Makefile.PL LIB=/usr/home/username/modules PREFIX=/usr/home/user +name/modules [Thu Dec 15 09:54:13 2005] Makefile.PL: Warning: prerequisite CGI::App +lication 3.21 not found. We have 3.1. [Thu Dec 15 09:54:13 2005] Makefile.PL: Warning: prerequisite CGI::Ses +sion 3.95 not found. We have 3.94. Writing Makefile for CGI::Application::Plugin::Session

Figured I needed to update two modules. So I installed CGI::Application 4.03 without problems. Then tried installing CGI::Session and got a bunch of errors that didn't help *me*. Read make test reports errors in Tutorials, perused the README's, and anything else I could find.

So I just went ahead and tried to install CGI::Application::Plugin::Session again. But I got the same exact error that it was missing the newer CGI::Application that I had just installed! Do I have to do something to point the the CGI::Application in *my* home directory?

Here's the complete report during Make test for CGI::Session:

%make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/api3_db_file..................NOK 10# Failed test (t/api3_db_fil +e.t at line 46) Can't call method "id" on an undefined value at t/api3_db_file.t line +48. # Looks like you planned 14 tests but only ran 10. # Looks like your test died just after 10. t/api3_db_file..................dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 10-14 Failed 5/14 tests, 64.29% okay t/api3_db_file_freezethaw.......NOK 10# Failed test (t/api3_db_fil +e_freezethaw.t at line 50) Can't call method "id" on an undefined value at t/api3_db_file_freezet +haw.t line 52. # Looks like you planned 14 tests but only ran 10. # Looks like your test died just after 10. t/api3_db_file_freezethaw.......dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 10-14 Failed 5/14 tests, 64.29% okay t/api3_db_file_storable.........NOK 10# Failed test (t/api3_db_fil +e_storable.t at line 47) Can't call method "id" on an undefined value at t/api3_db_file_storabl +e.t line 48. # Looks like you planned 14 tests but only ran 10. # Looks like your test died just after 10. t/api3_db_file_storable.........dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 10-14 Failed 5/14 tests, 64.29% okay t/api3_db_file_storable_incr....ok 3/15# Failed test (t/api3_db_fi +le_storable_incr.t at line 51) t/api3_db_file_storable_incr....ok 4/15Can't call method "id" on an un +defined value at t/api3_db_file_storable_incr.t line 52. t/api3_db_file_storable_incr....ok 5/15# Looks like you planned 15 tes +ts but only ran 11. t/api3_db_file_storable_incr....ok 6/15# Looks like your test died jus +t after 11. t/api3_db_file_storable_incr....dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 11-15 Failed 5/15 tests, 66.67% okay t/api3_file.....................ok + t/api3_file_freezethaw..........ok + t/api3_file_freezethaw_incr.....ok + t/api3_file_storable............ok + t/api3_file_storable_incr.......ok + t/api3_incr.....................ok + t/api3_obj_store................ok + t/api3_obj_store_db_file........Can't call method "id" on an undefined + value at t/api3_obj_store_db_file.t line 55 (#1) (F) You used the syntax of a method call, but the slot filled by t +he object reference or package name contains an undefined value. Som +ething like this will reproduce the error: $BADREF = undef; process $BADREF 1,2,3; $BADREF->process(1,2,3); Uncaught exception from user code: Can't call method "id" on an undefined value at t/api3_obj_sto +re_db_file.t line 55. t/api3_obj_store_db_file........dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 5-8 Failed 4/8 tests, 50.00% okay t/cgi_simple....................skipped all skipped: CGI::Simple not installed, so skipping related te +sts. t/complex_ds....................ok + t/driver_dbi....................ok + t/expire........................ok + t/flush.........................ok + t/g4............................ok + t/g4_dbfile.....................ok + t/g4_dbfile_freezethaw..........ok + t/g4_dbfile_storable............ok + t/g4_freezethaw.................ok + t/g4_mysql......................Use of uninitialized value in join or +string at /usr/local/lib/perl5/site_perl/5.8.0/i386-freebsd/DBI.pm line +526 (#1) (W uninitialized) An undefined value was used as if it were alread +y defined. It was interpreted as a "" or a 0, but maybe it was a mi +stake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl tells you what ope +ration you used the undefined value in. Note, however, that perl optimiz +es your program and the operation displayed in the warning may not necessa +rily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer +to the concatenation (.) operator, even though there is no . in your program. skipped all skipped: Couldn't establish connection with the MySQL serv +er: Can't connect( username HASH(0x8164ba4)), no database driver spe +cified and DBI_DSN env var not set at t/g4_mysql.t line 43 t/g4_mysql_freezethaw...........skipped all skipped: Couldn't establish connection with the server t/g4_mysql_storable.............skipped all skipped: Couldn't establish connection with the server t/g4_postgresql.................skipped all skipped: DataSource is not known t/g4_postgresql_freezethaw......skipped all skipped: DataSource is not known t/g4_postgresql_storable........skipped all skipped: DataSource is not known t/g4_sqlite.....................Use of uninitialized value in string e +q at /usr/local/lib/perl5/site_perl/5.8.0/i386-freebsd/DBD/SQLite.p +m line 88 (#1) (W uninitialized) An undefined value was used as if it were alread +y defined. It was interpreted as a "" or a 0, but maybe it was a mi +stake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl tells you what ope +ration you used the undefined value in. Note, however, that perl optimiz +es your program and the operation displayed in the warning may not necessa +rily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer +to the concatenation (.) operator, even though there is no . in your program. t/g4_sqlite.....................ok + t/g4_sqlite_freezethaw..........ok + t/g4_sqlite_storable............ok 79/99Can't locate object method "er +rstr" via package "CGI::Session::Serialize::storable" at /usr/home/us +ername/.cpan/build/CGI-Session-4.03/blib/lib/CGI/Session.pm line 674. # Looks like you planned 99 tests but only ran 79. # Looks like your test died just after 79. t/g4_sqlite_storable............dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 80-99 Failed 20/99 tests, 79.80% okay (less 56 skipped tests: 23 oka +y, 23.23%) t/g4_storable...................ok + t/header........................ok + t/ip_matches....................ok + t/is_new........................ok + t/load..........................ok + t/parse_dsn.....................ok + t/remote_addr...................ok + t/str2seconds...................ok + Failed Test Stat Wstat Total Fail Failed List of +Failed ---------------------------------------------------------------------- +--------- t/api3_db_file.t 255 65280 14 9 64.29% 10-14 t/api3_db_file_freezethaw.t 255 65280 14 9 64.29% 10-14 t/api3_db_file_storable.t 255 65280 14 9 64.29% 10-14 t/api3_db_file_storable_incr.t 255 65280 15 9 60.00% 11-15 t/api3_obj_store_db_file.t 255 65280 8 7 87.50% 5-8 t/g4_sqlite_storable.t 255 65280 99 40 40.40% 80-99 7 tests and 56 subtests skipped. Failed 6/39 test scripts, 84.62% okay. 44/1117 subtests failed, 96.06% + okay. *** Error code 2 Stop in /usr/home/username/.cpan/build/CGI-Session-4.03.

We all encourage one another to tap the CPAN modules, I just wish the process of installing them was more reliable. Anyway, maybe I'll get better at troubleshooting these issues. Thanks!


—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Replies are listed 'Best First'.
Re: Yet another module installation issue
by Nitrox (Chaplain) on Dec 15, 2005 at 15:36 UTC
    Try setting your PERL5LIB variable:
    export PERL5LIB=/usr/home/username/modules
    And then give the CGI::Application::Plugin::Session install another shot.

    -Nitrox

      Thanks for the direction, Nitrox. I tried the suggested line and got "export: command not found" error. Tried setenv and that part worked. However, it still is looking for the latest CGI::Session which I can't install without the errors mentioned in the OP.


      —Brad
      "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
Re: Yet another module installation issue
by trwww (Priest) on Dec 15, 2005 at 18:55 UTC

    CGI::Session has interfaces to several storage mechanisms. From your Failed Test summary it appears that the only store your tests had trouble with is the DB_File store.

    CGI::Application::Plugin::Session uses the File store by default. Your tests that test the File store seem okay. What I would do if I were you would be to go ahead and make install CGI::Session and then make test C::A::P::Session and see what happens. Chances are they will pass.

    I did a short article on the C::A wiki that shows a standalone app using C::A::P::Session at http://cgiapp.erlbaum.net/cgi-bin/cgi-app/index.cgi?CgiApplicationPluginSessionExample. Use that as your final test.

    Indeed, I just had a look in my .cpan/build/CGI-Session-3.95 from when I installed mine and I did a make test and some of the tests failed, but the tests on my session plugin ran fine (I've been using C::A::P::Session in production for a while now). This tells me that the only time I will need to worry about the failed tests, then, is when/if I want to use the session stores that CGI::Session couldn't make test

    As far as the install process being more reliable, I'd say it is about as reliable as it can get. The module didn't install itself in an unusable state, and gave us some pretty good clues on what needs to be looked at.

    trwww

      Thanks much trww. It worked! I guess that's what they mean by "force." I suppose the next step is to test both to make sure they really took.

      I've learned a couple of things as the result of this node, but the main thing is that the installation of a CPAN module will not always appear to be going perfectly, but keep going anyway.

      I just wish I knew what the reports were really telling me. Some I get, most I don't.


      —Brad
      "The important work of moving the world forward does not wait to be done by perfect men." George Eliot

        ... the installation of a CPAN module will not always appear to be going perfectly, but keep going anyway.

        A safer statement would be "keep going when you know it is not going to affect the rest of your system."

        Blindly force installing a module that does not pass its tests is probably a bad idea.

        trwww

      And we wonder why PHP has taken so much of Perl's territory in recent years. CPAN might be Perl's greatest asset but it also it's Achilles heel.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2021-10-20 04:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (78 votes). Check out past polls.

    Notices?