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

Hello Monks,

While installing the otherwise problem-free Cache::Cascade on a new Debian 4.0 system, I get this weird error from cpan:
CPAN.pm: Going to build N/NU/NUFFIN/Cache-Cascade-0.01.tar.gz Checking whether your kit is complete... Looks good Checking prerequisites... Looks good Creating new 'Build' script for 'Cache-Cascade' version '0.01' Copying lib/Cache/Cascade.pm -> blib/lib/Cache/Cascade.pm Manifying blib/lib/Cache/Cascade.pm -> blib/libdoc/Cache::Cascade.3pm NUFFIN/Cache-Cascade-0.01.tar.gz ./Build -- OK Running Build test t/basic.............1/21 # Failed test 'use Cache::Cascade;' # at t/basic.t line 8. # Tried to use 'Cache::Cascade'. # Error: Can't locate tt.pm in @INC (@INC contains: /root/.cpan/b +uild/Cache-Cascade-0.01-3UluB4/blib/lib /root/.cpan/build/Cache-Casca +de-0.01-3UluB4/blib/arch /etc/perl /usr/local/lib/perl/5.8.8 /usr/loc +al/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 + /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /root/.cpan/build +/Cache-Cascade-0.01-3UluB4/blib/lib/Cache/Cascade.pm line 70. # BEGIN failed--compilation aborted at /root/.cpan/build/Cache-Cascade +-0.01-3UluB4/blib/lib/Cache/Cascade.pm line 70. # Compilation failed in require at (eval 3) line 2. # BEGIN failed--compilation aborted at (eval 3) line 2. Can't locate object method "float_hits" via package "Cache::Cascade" a +t /root/.cpan/build/Cache-Cascade-0.01-3UluB4/blib/lib/Cache/Cascade. +pm line 30. # Looks like you planned 21 tests but only ran 2. # Looks like you failed 1 test of 2 run. # Looks like your test died just after 2. t/basic............. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 20/21 subtests t/cache_tester......1/? # Failed test 'use Cache::Cascade;' # at t/cache_tester.t line 13. # Tried to use 'Cache::Cascade'. # Error: Can't locate tt.pm in @INC (@INC contains: /root/.cpan/b +uild/Cache-Cascade-0.01-3UluB4/blib/lib /root/.cpan/build/Cache-Casca +de-0.01-3UluB4/blib/arch /etc/perl /usr/local/lib/perl/5.8.8 /usr/loc +al/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 + /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /root/.cpan/build +/Cache-Cascade-0.01-3UluB4/blib/lib/Cache/Cascade.pm line 70. # BEGIN failed--compilation aborted at /root/.cpan/build/Cache-Cascade +-0.01-3UluB4/blib/lib/Cache/Cascade.pm line 70. # Compilation failed in require at (eval 3) line 2. # BEGIN failed--compilation aborted at (eval 3) line 2. Can't locate object method "entry" via package "Cache::Cascade" at /us +r/local/share/perl/5.8.8/Cache/Tester.pm line 67. # Looks like you failed 1 test of 1. # Looks like your test died just after 1. t/cache_tester...... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/1 subtests Test Summary Report ------------------- t/basic.t (Wstat: 65280 Tests: 2 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 21 tests but ran 2. t/cache_tester.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Files=2, Tests=3, 1 wallclock secs ( 0.01 usr 0.00 sys + 0.53 cusr + 0.02 csys = 0.56 CPU) Result: FAIL Failed 2/2 test programs. 2/3 subtests failed. NUFFIN/Cache-Cascade-0.01.tar.gz ./Build test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports NUFFIN/Cache-Cascade-0.01.tar.gz Running Build install make test had returned bad status, won't install without force Failed during this command: NUFFIN/Cache-Cascade-0.01.tar.gz : make_test NO
I dived a bit into the test routines to see what's wrong, but I can't find the error. For testing, the t-script requires the module from the temporary path /root/.cpan/build/Cache-Cascade-0.01-3UluB4/blib/lib - where the module resides.
It should work but the test complains "Can't locate tt.pm in @INC" which isn't a module BUT a subroutine in Cascade.pm!

Any ideas?? A fresh look would help...

Replies are listed 'Best First'.
Re: Cache::Cascade, weird trouble installing via cpan
by Corion (Patriarch) on Jan 11, 2008 at 10:34 UTC

    Cache::Cascade distributes "both", a .pm file and a .pmc file. And the file Cache/Cascade.pm contains the line

    use tt ( methods => [qw/size count/] );

    So I suggest you contact nothingmuch about building his module. It seems that the .pmc is the macro-expanded version of Cache::Cascade, as generated by Module::Compile, but it further seems to me that his installation process does not install .pmc files properly.

Re: Cache::Cascade, weird trouble installing via cpan
by stvn (Monsignor) on Jan 11, 2008 at 14:11 UTC

    Install Module::Compile::TT and you should be okay, that is the disto which has tt.pm in it.

    -stvn
      That fixed it! Thanks A LOT! I can finally stop pulling my hair out... ;-)