|
Posted by Ray on October 22, 2004, 11:19 am
Please log in for more thread options
I am writing a module that uses the Mail::Sender module to send
messages.
The module works correctly when called from a test perl script, but if
I try to call it from the command line, using "perl remedyMail.pm", I
get the following message:
Can't locate Mail/Sender.pm in @INC (@INC contains:
/opt/TWWfsw/perl582/lib/5.8.2/sun4-solaris-thread-multi
/opt/TWWfsw/perl582/lib/5.8.2 /opt/TWWfsw/perl582p/.
BEGIN failed--compilation aborted at remedyMail.pm line 5.
Can anyone help me understand how to fix this problem? I have written
many perl scripts, but this is my first module.
TIA,
-Ray
|
|
Posted by Bill Karwin on October 22, 2004, 11:40 am
Please log in for more thread options
Ray wrote:
> I am writing a module that uses the Mail::Sender module to send
> messages.
> The module works correctly when called from a test perl script, but if
> I try to call it from the command line, using "perl remedyMail.pm", I
> get the following message:
>
> Can't locate Mail/Sender.pm in @INC (@INC contains:
> /opt/TWWfsw/perl582/lib/5.8.2/sun4-solaris-thread-multi
> /opt/TWWfsw/perl582/lib/5.8.2 /opt/TWWfsw/perl582p/.
> BEGIN failed--compilation aborted at remedyMail.pm line 5.
>
> Can anyone help me understand how to fix this problem? I have written
> many perl scripts, but this is my first module.
I'm going to guess that you have at least two instances of Perl
installed, Mail::Sender is installed under only one of the instances,
and a different instance is invoked when you type "perl remedyMail.pm".
What value does your PATH environment variable have?
Is your shell finding an instance of perl in your PATH different from
the one named in the #! line of your test script?
How are you invoking the test perl script?
What is the first line ("#!...") of the test perl script?
Regards,
Bill K.
|
|
Posted by Ray on October 25, 2004, 6:33 am
Please log in for more thread options Bill,
I see where you are going with this... The first line of my test
script is #!/usr/local/bin/perl. I was typing "perl remedyMail.pm" to
run my module, which is obviously calling a different instance of
perl. When I typed "/usr/local/bin/perl remedyMail.pm", it worked
perfectly.
Thanks!
-Ray
> Ray wrote:
> > I am writing a module that uses the Mail::Sender module to send
> > messages.
> > The module works correctly when called from a test perl script, but if
> > I try to call it from the command line, using "perl remedyMail.pm", I
> > get the following message:
> >
> > Can't locate Mail/Sender.pm in @INC (@INC contains:
> > /opt/TWWfsw/perl582/lib/5.8.2/sun4-solaris-thread-multi
> > /opt/TWWfsw/perl582/lib/5.8.2 /opt/TWWfsw/perl582p/.
> > BEGIN failed--compilation aborted at remedyMail.pm line 5.
> >
> > Can anyone help me understand how to fix this problem? I have written
> > many perl scripts, but this is my first module.
>
> I'm going to guess that you have at least two instances of Perl
> installed, Mail::Sender is installed under only one of the instances,
> and a different instance is invoked when you type "perl remedyMail.pm".
>
> What value does your PATH environment variable have?
> Is your shell finding an instance of perl in your PATH different from
> the one named in the #! line of your test script?
>
> How are you invoking the test perl script?
> What is the first line ("#!...") of the test perl script?
>
> Regards,
> Bill K.
|
| Similar Threads | Posted | | Can't locate loadable object for module | June 22, 2005, 12:37 pm |
| Can't locate loadable object for module Tk::Event | July 15, 2005, 9:15 am |
| HOWTO - do local ppm module install (fix "Could not locate a PPDfile") | July 9, 2005, 5:25 pm |
| can't locate pg | January 16, 2005, 6:42 pm |
| Can't locate Tk/MDI/ChildWindow.pm | September 23, 2006, 11:41 pm |
| Perl & DBI cannot locate | November 20, 2006, 2:07 pm |
| Can't locate DBD/ODBC.pm in @INC | November 20, 2008, 11:55 am |
| Can't locate loadable object | August 4, 2005, 12:18 am |
| Can't locate object method "ymd" via package... | August 3, 2007, 6:14 am |
| Problem with Net::SSH::Perl module | December 22, 2004, 12:38 pm |
|