in reply to Re: Problems locating modules
in thread Problems locating modules

Thanks for the pointers. I did the recommended module installs, but now there are errors occurring that I've never experienced (not really a surprise)

[root@host /usr/home/user]# swish3 -S mailfs -i /home/mail-archive/tes +t/* Bareword "DateTime::INFINITY" not allowed while "strict subs" in use a +t /usr/local/lib/perl5/site_perl/5.10.1/mach/DateTime/Infinite.pm lin +e 31. Bareword "DateTime::INFINITY" not allowed while "strict subs" in use a +t /usr/local/lib/perl5/site_perl/5.10.1/mach/DateTime/Infinite.pm lin +e 31. Bareword "DateTime::NEG_INFINITY" not allowed while "strict subs" in u +se at /usr/local/lib/perl5/site_perl/5.10.1/mach/DateTime/Infinite.pm + line 31. BEGIN not safe after errors--compilation aborted at /usr/local/lib/per +l5/site_perl/5.10.1/mach/DateTime/Infinite.pm line 42. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.10.1 +/./Rose/DateTime/Util.pm line 8. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +10.1/./Rose/DateTime/Util.pm line 8. Compilation failed in require at /usr/local/bin/swish3 line 21. BEGIN failed--compilation aborted at /usr/local/bin/swish3 line 21.

Line 31 of /usr/local/lib/perl5/site_perl/5.10.1/mach/DateTime/Infinite.pm

30 sub _stringify { 31 $_[0]->{utc_rd_days} == DateTime::INFINITY 32 ? DateTime::INFINITY . '' 33 : DateTime::NEG_INFINITY . ''; 34 }

Now, /home/mail-archive/test/* is referencing a directory of plain text files. I'm not sure if that is contributing to the "Bareword" error or not. *sigh*

Replies are listed 'Best First'.
Re^3: Problems locating modules
by Corion (Patriarch) on May 18, 2011 at 13:44 UTC

    Maybe you have an old (or broken) installation of DateTime? At least DateTime 0.70 has these two lines:

    use constant INFINITY => ( 9**9**9 ); use constant NEG_INFINITY => -1 * ( 9**9**9 );

    Also, why are you testing the Perl module/program through "swish" instead of trying to eliminate the irrelevant parts? I would start with perl -MDateTime::Infinity -e1 resp. perl -MDateTime -e1 and slowly work my way up the chain until things fail.

      the swish3 index is what I am trying to get to work, so my approach was to continue to run it until I didn't get any errors. My Nodelet status is not without reason :) So, I ran:

      perl -MDateTime -e1

      No errors or output of any kind. I appear to be running DateTime 0.70 as mentioned

      [root@host /usr/home/user]# cpan DateTime CPAN: Storable loaded ok (v2.25) Going to read '/home/user/.cpan/Metadata' Database was generated on Tue, 31 May 2011 09:28:15 GMT CPAN: Module::CoreList loaded ok (v2.49) DateTime is up to date (0.70).

      Now, when I check DateTime::Infinity, it's a different story

      [root@host /usr/home/user]# perl -MDateTime::Infinity -e1 Can't locate DateTime/Infinity.pm in @INC (@INC contains: /usr/local/l +ib/perl5/5.10.1/BSDPAN /usr/local/lib/perl5/site_perl/5.10.1/mach /us +r/local/lib/perl5/site_perl/5.10.1 /usr/local/lib/perl5/5.10.1/mach / +usr/local/lib/perl5/5.10.1 .). BEGIN failed--compilation aborted.

      Looking more, it seems I was maybe getting DateTime::Infinite and DateTime::Infinity confused, of which the later appears to not exist?