I am using Mac OS X with the built in configuration of Apache. I am taking a web dev class where we're writing perl scripts ... so far I've been able to get my CGI scripts to run via mod_perl. Now, I'm trying to install CGI::Session via CPAN and it's not working and getting me very frustrated.

I don't have much experience at all with the mac terminal.

The following is what I did: First I typed perl -MCPAN -e shell and then I typed install CGI::Session I can't even manage to show you all of the messages that appeared on my screen as a result of typing that because xterm won't let me page up far enough back. However, below is the second half of it all:

Manifying blib/man3/CGI::Session::Driver::file.3pm
Manifying blib/man3/CGI::Session::ID::md5.3pm
  /usr/bin/make  -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/api3_db_file..................ok 9/14#     Failed test (t/api3_db_file.t at line 46)
Can't call method "id" on an undefined value at t/api3_db_file.t line 48.
t/api3_db_file..................NOK 10# 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.......skipped
        all skipped: FreezeThaw not available
t/api3_db_file_storable.........ok 9/14#     Failed test (t/api3_db_file_storable.t at line 47)
Can't call method "id" on an undefined value at t/api3_db_file_storable.t line 48.
t/api3_db_file_storable.........NOK 10# 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 10/15#     Failed test (t/api3_db_file_storable_incr.t at line 51)
Can't call method "id" on an undefined value at t/api3_db_file_storable_incr.t line 52.
t/api3_db_file_storable_incr....NOK 11# Looks like you planned 15 tests but only ran 11.
# Looks like your test died just 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..........skipped
        all skipped: FreezeThaw not available
t/api3_file_freezethaw_incr.....skipped
        all skipped: FreezeThaw not available
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 the
    object reference or package name contains an undefined value.  Something
    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_store_db_file.t line 55.
 at t/api3_obj_store_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 tests.
t/complex_ds....................ok                                           
t/driver_dbi....................skipped
        all skipped: DBI module not found
t/expire........................ok                                           
t/flush.........................ok                                           
t/g4............................ok                                           
t/g4_dbfile.....................ok                                           
t/g4_dbfile_freezethaw..........skipped
        all skipped: FreezeThaw is NOT available
t/g4_dbfile_storable............ok                                           
t/g4_freezethaw.................skipped
        all skipped: FreezeThaw is NOT available
t/g4_mysql......................skipped
        all skipped: DBI is NOT available
t/g4_mysql_freezethaw...........skipped
        all skipped: DBI is NOT available
t/g4_mysql_storable.............skipped
        all skipped: DBI is NOT available
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.....................skipped
        all skipped: DBI is NOT available
t/g4_sqlite_freezethaw..........skipped
        all skipped: DBI is NOT available
t/g4_sqlite_storable............skipped
        all skipped: DBI is NOT available
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_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
16 tests skipped.
Failed 4/39 test scripts, 89.74% okay. 19/576 subtests failed, 96.70% okay.
make: *** [test_dynamic] Error 2
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

cpan> exit                               
Terminal does not support GetHistory.
Lockfile removed.
iputie:~ dani$

Do I have this thing half installed half not installed now?? :(

Recommended Answers

All 2 Replies

I would personally suggest downloading the module from CPAN's website at:
http://www.cpan.org, and download the bundle in the tar/gz format. Then, once you have it downloaded, make a temp folder of some kind, that will contain the extracted files (a tar/gz is sort of like a .zip file), then move the tar/gz file to the new folder, and extract the files (or, make the new folder, and download the file to it). Once there, ungz, untar it, and run the installation yourself....something crazy like:

gunzip CGI-Application-Session-0.07.tar.gz     #unzip the file
tar xvf CGI-Application-Session-0.07.tar         #untar the file

Then once it's unzipped and untared, you'll need to check out the makefile.... in the example that I'm using here (application-session), you'll need to run perl on the makefile... so:

perl Makefile.PL  #run perl on the makefile
make               #Run the make command on the output file from Makefile.PL
make install      #run the installation parameter of make on the makefile (or install file)

Don't get me wrong, I'm sure there are other ways and other fixes, as always... but this seems to be working for me... if you have any errors or problems trying it this way, I'll see if I can't help you through them also... in any case, let me know the outcome.

I looked into this a little. I learned that the O_NOFOLLOW flag

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.