Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding a .pm package without Use or Include 1

Status
Not open for further replies.

cloxwerx

Programmer
Joined
Nov 17, 2006
Messages
2
Location
US
A remote PERL (perl5/5.8.6) facility running under Linux does not have the mail::sendmail package I would like to use. Is there a way to embed this package in my uploadable program in place of the "use mail::sendmail" statement? I'm doing cross-platform work and believe this will function without alteration between ActivePerl on Windows XP and the Linux system.

Thanks for any suggestions.

Dennis
 
you can distribute the mail::sendmail module with your script and use the 'lib' pragma to make sure it's avaialble to use on a server that does not have it installed.


mail::sendmail also uses Sys::Hostname but that is a core module so you should be OK in most cases.



- Kevin, perl coder unexceptional!
 
Thanks, Kevin.

That was the perfect solution. After establishing the correct path to my add-on library for the cross-platform module the program ran correctly as it had on a Windows system.

Dennis
 
You're welcome [smile]

- Kevin, perl coder unexceptional!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top