?
Solved

CGI::Session install test fails perl module

Posted on 2007-08-02
3
Medium Priority
?
482 Views
Last Modified: 2008-01-09
Hi,

I am using CPAN to install (private perl5, i.e. non-system wide)  CGI::Session module 4.20 on a solaris machine.  Even though make && 'make install' works (I believe with force), 'make test' fails.

Do I need to set  DBI_DSN variable?
Available drivers are:
DBM, ExampleP, File, Gofer, Oracle, Proxy, Sponge, mysql

If I have to set DBI_DNS - what do I pass in to set it to mysql?

This is how I found out what drivers are available:
#!/usr/bin/perl -w
require DBI;
my @drivers = DBI->available_drivers;
print join(", ", @drivers), "\n";


make test:
PERL_DL_NONLAZY=1 /opt/csw/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/api3_db_file..................couldn't find diagnostic data in /opt/csw/share/perl/5.8.8/pods/perldiag.pod /home/cc-wiki/downloads/CGI-Session-4.20/blib/lib
/home/cc-wiki/downloads/CGI-Session-4.20/blib/arch /homes/cc-wiki/myperl/lib/perl5/i86pc-solaris-thread-multi /homes/cc-wiki/myperl/lib/perl5/i86pc-solaris-thr
ead-multi /homes/cc-wiki/myperl/lib/perl5 /opt/csw/lib/perl/5.8.8 /opt/csw/share/perl/5.8.8 /opt/csw/lib/perl/site_perl /opt/csw/share/perl/site_perl /opt/csw/
lib/perl/csw /opt/csw/share/perl/csw . /opt/csw/lib/perl/5.8.8 /opt/csw/share/perl/5.8.8 /opt/csw/lib/perl/site_perl /opt/csw/share/perl/site_perl /opt/csw/sha
re/perl/site_perl /opt/csw/lib/perl/csw /opt/csw/share/perl/csw /opt/csw/share/perl/csw . t/api3_db_file.t at /opt/csw/share/perl/5.8.8/diagnostics.pm line 268
, <POD_DIAG> line 646.
Compilation failed in require at t/api3_db_file.t line 4, <POD_DIAG> line 646.
BEGIN failed--compilation aborted at t/api3_db_file.t line 4, <POD_DIAG> line 646.
^M                                                                             ^Mt/api3_db_file..................dubious
        Test returned status 2 (wstat 512, 0x200)
.
.
.
Compilation failed in require at t/symlink_file.t line 5, <POD_DIAG> line 646.
BEGIN failed--compilation aborted at t/symlink_file.t line 5, <POD_DIAG> line 646.
^M                                                                             ^Mt/symlink_file..................dubious
        Test returned status 2 (wstat 512, 0x200)
Failed Test                    Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/api3_db_file.t                  2   512    ??   ??  ??
t/api3_db_file_freezethaw.t       2   512    ??   ??  ??
t/api3_db_file_storable.t         2   512    ??   ??  ??
t/api3_db_file_storable_incr.t    2   512    ??   ??  ??
t/api3_file.t                     2   512    ??   ??  ??
t/api3_file_freezethaw.t          2   512    ??   ??  ??
t/api3_file_freezethaw_incr.t     2   512    ??   ??  ??
t/api3_file_storable.t            2   512    ??   ??  ??
t/api3_file_storable_incr.t       2   512    ??   ??  ??
t/api3_incr.t                     2   512    ??   ??  ??
t/api3_obj_store.t                2   512    ??   ??  ??
t/api3_obj_store_db_file.t        2   512    ??   ??  ??
t/cgi_simple.t                    2   512    ??   ??  ??
t/complex_ds.t                    2   512    ??   ??  ??
t/driver_dbi.t                    2   512    ??   ??  ??
t/expire.t                        2   512    ??   ??  ??
t/g4.t                            2   512    ??   ??  ??
t/g4_dbfile.t                     2   512    ??   ??  ??
t/g4_dbfile_freezethaw.t          2   512    ??   ??  ??
t/g4_dbfile_json.t                2   512    ??   ??  ??
t/g4_dbfile_storable.t            2   512    ??   ??  ??
t/g4_dbfile_yaml.t                2   512    ??   ??  ??
t/g4_freezethaw.t                 2   512    ??   ??  ??
t/g4_mysql.t                      2   512    ??   ??  ??
t/g4_mysql_freezethaw.t           2   512    ??   ??  ??
t/g4_mysql_storable.t             2   512    ??   ??  ??
t/g4_postgresql.t                 2   512    ??   ??  ??
t/g4_postgresql_freezethaw.t      2   512    ??   ??  ??
t/g4_postgresql_storable.t        2   512    ??   ??  ??
t/g4_sqlite.t                     2   512    ??   ??  ??
t/g4_sqlite_freezethaw.t          2   512    ??   ??  ??
t/g4_sqlite_storable.t            2   512    ??   ??  ??
t/g4_storable.t                   2   512    ??   ??  ??
t/header.t                        2   512    ??   ??  ??
t/ip_matches.t                    2   512    ??   ??  ??
t/is_new.t                        2   512    ??   ??  ??
t/load.t                          2   512    ??   ??  ??
t/name.t                          2   512    ??   ??  ??
t/parse_dsn.t                     2   512    ??   ??  ??
t/str2seconds.t                   2   512    ??   ??  ??
t/symlink_db_file.t               2   512    ??   ??  ??
t/symlink_file.t                  2   512    ??   ??  ??
Failed 42/46 test scripts. 0/26 subtests failed.
Files=46, Tests=26,  1 wallclock secs ( 0.62 cusr +  0.08 csys =  0.70 CPU)
Failed 42/46 test programs. 0/26 subtests failed.
*** Error code 2
make: Fatal error: Command failed for target `test_dynamic'
0
Comment
Question by:Purdue_Pete
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
clockwatcher earned 150 total points
ID: 19629473
Line 4 of api3_db_file.t is:

  use diagnostics

And the rest of the error has to do with you not having the perldiag.pod installed somewhere that your perl can find.  Not sure if you didn't include the documentation in your build or what, but you can download the 5.8.8 perldiag.pod from here:
 
  http://search.cpan.org/src/NWCLARK/perl-5.8.8/pod/perldiag.pod

And throw it in this directory-- /opt/csw/share/perl/5.8.8/pods/

Based on the error message, it looks like it'll pick it up from there.
0
 

Author Comment

by:Purdue_Pete
ID: 19672973
Though Perldiag pod helped solved the problem...I got this error afterwards, which I am assuming because of poor tests written.

t/g4_dbfile_json................# JSON::Syck
t/g4_dbfile_json................ok 51/101       (in cleanup) Dumping circular structures is not supported with JSON::Syck at /home/cc-wiki/.cpan/build/CGI-Session-4.20/blib/lib/CGI/Session/Serialize/json.pm line 18.

#   Failed test 'Previously stored object loaded successfully'
t/g4_dbfile_json................NOK 84#   at /home/cc-wiki/.cpan/build/CGI-Session-4.20/blib/lib/CGI/Session/Test/Default.pm line 362.

#   Failed test at /home/cc-wiki/.cpan/build/CGI-Session-4.20/blib/lib/CGI/Session/Test/Default.pm line 362.
t/g4_dbfile_json................NOK 90Use of uninitialized value in string eq at
        /home/cc-wiki/.cpan/build/CGI-Session-4.20/blib/lib/CGI/Session/Test/Default.pm line 325 (#1)
    (W uninitialized) An undefined value was used as if it were already
    defined.  It was interpreted as a "" or a 0, but maybe it was a mistake.
    To suppress this warning assign a defined value to your variables.
   
    To help you figure out what was undefined, perl tells you what operation
    you used the undefined value in.  Note, however, that perl optimizes your
    program and the operation displayed in the warning may not necessarily
    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.
   
Can't call method "can" on an undefined value at /opt/csw/share/perl/5.8.8/overload.pm line 54.
# Looks like you planned 101 tests but only ran 91.
# Looks like you failed 2 tests of 91 run.
# Looks like your test died just after 91.
t/g4_dbfile_json................dubious                                      
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 84, 90, 92-101
        Failed 12/101 tests, 88.12% okay (less 6 skipped tests: 83 okay, 82.18%)
t/g4_dbfile_storable............ok                                          
t/g4_dbfile_yaml................# YAML::Syck
t/g4_dbfile_yaml................ok                                          
        1/101 skipped: Test does not apply to this setup.
t/g4_freezethaw.................skipped
        all skipped: FreezeThaw is NOT available
t/g4_mysql......................skipped
        all skipped: Couldn't establish connection with the MySQL server: Can't connect to data source '' because I can't work out what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at t/g4_mysql.t line 44
t/g4_mysql_freezethaw...........skipped
        all skipped: FreezeThaw is NOT available
t/g4_mysql_storable.............skipped
        all skipped: Couldn't establish connection with the MySQL server: Can't connect to data source '' because I can't work out what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at t/g4_mysql_storable.t line 43
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: DBD::SQLite is NOT available
t/g4_sqlite_freezethaw..........skipped
        all skipped: DBD::SQLite is NOT available
t/g4_sqlite_storable............skipped
        all skipped: DBD::SQLite is NOT available
t/g4_storable...................ok                                          
t/header........................ok                                          
t/ip_matches....................ok                                          
t/is_new........................ok                                          
t/load..........................ok                                          
t/name..........................ok                                          
t/parse_dsn.....................ok                                          
t/remote_addr...................ok                                          
t/str2seconds...................ok                                          
t/symlink_db_file...............ok                                          
t/symlink_file..................ok                                          
Failed Test        Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/g4_dbfile_json.t  255 65280   101   22  21.78%  84 90 92-101
14 tests and 7 subtests skipped.
Failed 1/46 test scripts, 97.83% okay. 12/844 subtests failed, 98.58% okay.
*** Error code 29
make: Fatal error: Command failed for target `test_dynamic'
0
 

Author Comment

by:Purdue_Pete
ID: 19672997
Thanks for the solution you suggested- it worked. If you know how I can get rid of the another above problem also - that would be great. Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question