Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Perl Script - Can't locate module error

by puneet.keswani (Novice)
on May 16, 2012 at 14:30 UTC ( #970843=perlquestion: print w/replies, xml ) Need Help??
puneet.keswani has asked for the wisdom of the Perl Monks concerning the following question:

I have a perl script which works on dev box, but not on prod box dev box uses perl V5.8.8 prod box uses perl V5.8.4 The scripts fails with below error on prod box:
Can't locate Email/Date/ in @INC (@INC contains: /usr/perl5/5 +.8.4/lib/sun4-solaris-64int /usr/perl5/5.8.4/lib /usr/perl5/site_perl +/5.8.4/sun4-solaris-64int /usr/perl5/site_perl/5.8.4 /usr/perl5/site_ +perl /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int /usr/perl5/vendo +r_perl/5.8.4 /usr/perl5/vendor_perl .) at /usr/perl5/site_perl/5.8.4/ +MIME/ line 1100.
The line in the MIME::Lite perl module where it fails is:
1096 ### Datestamp if desired: 1097 my $ds_wanted = $params{Datestamp}; 1098 my $ds_defaulted = ( $is_top and !exists( $params{Datestam +p} ) ); 1099 if ( ( $ds_wanted or $ds_defaulted ) and !exists( $params{ +Date} ) ) { 1100 require Email::Date::Format; 1101 $self->add( "date", Email::Date::Format::email_date() +);
How can I check if perl module Email::Date::Format is installed ? Also is there a possibility that difference in perl versions might be causing this issue ?

Replies are listed 'Best First'.
Re: Perl Script - Can't locate module error
by marto (Archbishop) on May 16, 2012 at 14:39 UTC

    Install the Email::Date::Format module on your production server. Please don't ignore the formatting advice (as previously mentioned). Consider running the same version of Perl on development as you do in production. Note that your production version is 8 years old. Avoid using the system install or Perl. Your operating system uses this for various things. It's fairly simple to install your own (modern) version of perl elsewhere on the system.

      Email::Date::Format module is not there in Dev server but the script seems to be working fine, could there be any other reason for it to not execute in the prod environment.
Re: Perl Script - Can't locate module error
by Anonymous Monk on May 16, 2012 at 14:41 UTC
    Try find and/or locate (but verify) commands; use -M option of perl along with -e (see perlrun); run autobundle (overkill I think); see App::Module::Lister module; etc.
Re: Perl Script - Can't locate module error
by pvaldes (Chaplain) on May 16, 2012 at 21:55 UTC

    cpan> m Email::Date::Format

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://970843]
Approved by marto
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2018-04-20 16:48 GMT
Find Nodes?
    Voting Booth?