Do I use YAST,CPAN.org, 'make install'?
I just moved a NetWare Perl script over to OES2SP2/SLES10SP3.
The script fails because of missing SendMail.pm
Can't locate Mail/SendMail.pm in @INC (@INC contains:
//usr/lib/perl5/5.8.8/x86_64-linux-thread-multi
I have reviewed this link and it states:
http://www.tneoh.zoneit.com/perl/SendMail/FAQ.html#Q5
5) I got error:
Can't locate SendMail.pm in @INC (@INC contains:
/usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl .) at (eval 6) line 1.
Ans: Make sure you include the folder where you store those SendMail.pm,
MIME/Base64.pm and MIME/QuotedPrint.pm files into @INC.
You can do it with:
use lib qw(YOUR/FOLDER);
Maybe try running 'cpan' from the command line. From there you can use
cpan to pull in the modules for you.
Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJLctcrAAoJEF+XTK08PnB5ms4P+gMPn8LPTvHNuUk2VQSr8MDQ
QakUeFvuFIDqrnA9GGIT8oM7eMXrR8QQ5zqjHCGtEG5wlV2l8mTyhJLyHMDY+Lwg
a2eSXCzJd4vKza5ynYU7h1vdKl9DQIGkW2SDMNlb5Rcu8CS76TLmTqpM8ALXOBXr
9qycDSyOdWQCXS1f2+0qTVMii0R+1afS8FgHCjBevrBpFuMqgbt5hhQ9BrG7vjoS
ra54srle63FOOjOgQqkinplt1ldZyLVRPNAn7uaA4qbMoziTYfKPy+vsTYOfd1ak
RPF4vDlQDFzwZG4mV6/G6Xp1PFN2OckI0CJ2bAmKLCaY8wtEtH7aLuNrzejq95vE
OHgMYPS/h5JVpkHz3u9v7VgXaoOurBLb+he+PF5Lkti+9Gid49OmQf2J63d9TyIl
9AZkFkJzmt9e0CIqPIjVzgjfazZZbfgKuUNipBaY7p9Ul6vl3ZpliaDBlsa7BJPv
3Ode4GD1Ud97gtcRj+5XQBBRUN5kqZdMAXZeovCDn55K5ZeVw6lV+pRwVY+kwPfJ
gONhZ34j3X9RLIQSY2JdcKNEepj7ARya/vOKmclTycp/LuNUuYv2xDUf+m8m8OcN
+rApdNj/m4wvpjCzpZ5O6qvJcXgCzmvyO3ciLnaitUMUHCCJdG+xEx4MMVrjay6k
p0VG6htuMAUKwRtqDRNX
=BytD
-----END PGP SIGNATURE-----
You may find the following Cool Solutions article that I wrote useful -
http://www.novell.com/communities/node/9222/how-add-additional-perl-modules-your-linux-installation
As a...@novell.com noted you can use 'cpan' which is the equivalent of the
perl command at the beginning of my article.
HTH.
--
Simon
Novell Knowledge Partner (NKP)
------------------------------------------------------------------------
Do you work with Novell technologies at a university, college or school?
If so, your campus could benefit from joining the Novell Technology
Transfer Partners (TTP) group. See www.novell.com/ttp for more details.
------------------------------------------------------------------------
Thanks
I was actually plugging my way through just that; but Sendmail hangs?
What am I missing? How can I edit the test.pl or Sendmail.pm before
installation?
Thanks
Details
>>>>>>
Checking if your kit is complete...
Looks good
Writing Makefile for Mail::Sendmail
**********************************************************************
NOTE
----
The test (test.pl) is a real test for this module: it sends an e-mail.
You may want to edit test.pl before running it (directly or through
make test), so the mail is sent to you. If you also leave my address,
the mail goes into a database from which I can get statistics.
Read the docs, and have fun...
**********************************************************************
cp Sendmail.pm blib/lib/Mail/Sendmail.pm
Manifying blib/man3/Mail::Sendmail.3pm
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..2
Test Mail::Sendmail 0.79
Trying to send a message to the author (and/or whoever if you edited
test.pl)
(The test is designed so it can be run by Test::Harness from CPAN.pm.
Edit it to send the mail to yourself for more concrete feedback. If you
do this, you also need to specify a different mail server, and possibly
a different From: address.)
Current recipient(s): 'Sendmail Test <send...@alma.ch>'
ok 1
Server set to: mail.alma.ch
Sending...
Going to download manually edit the files then install and or copy.
Here is how I got Perl/CPAN working from an old Perl script on NetWare
with missing modules. Specifically Sendmail.pm
1: Obviously install Perl from Yast; usually default OES2 installation.
2: Follow Simon's great CoolSolutions to make sure CPAN is upto date.
Ensure MIME/Base64.pm and MIME/QuotedPrint.pm are installed as well to
use Sendmail.pm.
You could search for those as I am certain they are default too.
http://www.novell.com/communities/node/9222/how-add-additional-perl-modules-your-linux-installation
3: Manually download Sendmail.pm from a mirror of choice. Example.
http://search.cpan.org/~mivkovic/Mail-Sendmail-0.79/Sendmail.pm
4: Extract and edit Sendmail.pm and test.pl to reflect your mail relay
and your mail accounts for testing.
5:Perform a Traditional Perl install.
perl Makefile.PL
make
make test
make install
6: You should then receive an email.
7: Now you are ready to use Mail::Sendmail in your Perl scripts.