Search code examples
apacheperlcpancpanm

install Apache::Session::Memcached fail


I use sudo cpanm -v Apache::Session::Memcached to install under Ubuntu 12.04 LTS 64-bit. I'll paste the entire installation message in the bottom. My guess is that it's related to the test but don't understand what the test is and why it fails, since it's not a test I wrote and comes with the package. My question is: How to make it pass the tests? And if I ignore the test and force install it, will there be any negative side effects?

vagrant@precise64:~/application$ sudo cpanm -v Apache::Session::Memcached                
cpanm (App::cpanminus) 1.7014 on perl 5.014002 built for x86_64-linux-gnu-thread-multi
Work directory is /home/vagrant/.cpanm/work/1414779306.19403
You have make /usr/bin/make
You have LWP 6.03
You have /bin/tar: tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Apache::Session::Memcached on cpanmetadb ...
--> Working on Apache::Session::Memcached
Fetching http://www.cpan.org/authors/id/E/EN/ENRYS/Apache-Session-Memcached-0.03.tar.gz ... OK
Unpacking Apache-Session-Memcached-0.03.tar.gz
Apache-Session-Memcached-0.03/
Apache-Session-Memcached-0.03/t/
Apache-Session-Memcached-0.03/t/01cache.t
Apache-Session-Memcached-0.03/t/CONFIG
Apache-Session-Memcached-0.03/t/02flex.t
Apache-Session-Memcached-0.03/t/testlib.pl
Apache-Session-Memcached-0.03/t/00base.t
Apache-Session-Memcached-0.03/lib/
Apache-Session-Memcached-0.03/lib/Apache/
Apache-Session-Memcached-0.03/lib/Apache/Session/
Apache-Session-Memcached-0.03/lib/Apache/Session/Store/
Apache-Session-Memcached-0.03/lib/Apache/Session/Store/Memcached.pm
Apache-Session-Memcached-0.03/lib/Apache/Session/Memcached.pm
Apache-Session-Memcached-0.03/MANIFEST
Apache-Session-Memcached-0.03/Changes
Apache-Session-Memcached-0.03/README
Apache-Session-Memcached-0.03/META.yml
Apache-Session-Memcached-0.03/Makefile.PL
Entering Apache-Session-Memcached-0.03
Checking configure dependencies from META.yml
Running Makefile.PL
Configuring Apache-Session-Memcached-0.03 ... Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Apache::Session::Memcached
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have Cache::Memcached 1.14 ... Yes (1.30)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.00)
Checking if you have Apache::Session 1.54 ... Yes (1.93)
Building and testing Apache-Session-Memcached-0.03 ... cp lib/Apache/Session/Store/Memcached.pm blib/lib/Apache/Session/Store/Memcached.pm
cp lib/Apache/Session/Memcached.pm blib/lib/Apache/Session/Memcached.pm
Manifying 2 pod documents
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base.t ... ok   
t/01cache.t .. 1/4 Object does not exist in data store. at /home/vagrant/.cpanm/work/1414779306.19403/Apache-Session-Memcached-0.03/blib/lib/Apache/Session/Store/Memcached.pm line 44, <CFG> line 1.
t/01cache.t .. Dubious, test returned 111 (wstat 28416, 0x6f00)
Failed 2/4 subtests 
t/02flex.t ... 1/4 Object does not exist in data store. at /home/vagrant/.cpanm/work/1414779306.19403/Apache-Session-Memcached-0.03/blib/lib/Apache/Session/Store/Memcached.pm line 44, <CFG> line 1.
t/02flex.t ... Dubious, test returned 111 (wstat 28416, 0x6f00)
Failed 2/4 subtests 

Test Summary Report
-------------------
t/01cache.t (Wstat: 28416 Tests: 2 Failed: 0)
  Non-zero exit status: 111
  Parse errors: Bad plan.  You planned 4 tests but ran 2.
t/02flex.t (Wstat: 28416 Tests: 2 Failed: 0)
  Non-zero exit status: 111
  Parse errors: Bad plan.  You planned 4 tests but ran 2.
Files=3, Tests=5,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.14 cusr  0.02 csys =  0.19 CPU)
Result: FAIL
Failed 2/3 test programs. 0/5 subtests failed.
make: *** [test_dynamic] Error 111
FAIL
! Installing Apache::Session::Memcached failed. See /home/vagrant/.cpanm/work/1414779306.19403/build.log for details. Retry with --force to force install it.

Solution

  • Considering the version number is low, and there are bug reports open from 2010, I would suspect that there will likely be a negative side effect at some point.

    However, the module could still work as expected, if you do want to use it, I would recommend doing some testing on your own, and discovering why the install tests failed.

    In my own experience, though, unsupported modules may come back to haunt you at unexpected times in inconvenient ways.

    Of course, you could ask the author if you can take over the module ;)

    I would suggest taking a look at alternative session modules on cpan.

    I am using a Catalyst plugin, but Data::Session looks pretty good to me.