develooper Front page | perl.beginners | Postings from January 2002

RE: Library

Thread Previous
From:
Kingsbury, Michael
Date:
January 30, 2002 15:02
Subject:
RE: Library
Message ID:
CCE8403B91E4D4119E9300A0C9DDA22401C16E95@pigpen.avayactc.com
You need it to return a true value to indicate it successfully loaded.
Simpliest way is to have a 1; at the end of the file outside of any subs.
If your library required to initialize something, then perhaps you wouldn't
return a 1 if that initialization failed.

-mike

-----Original Message-----
From: Chi Lin [mailto:chilin786@hotmail.com]
Sent: Wednesday, January 30, 2002 5:56 PM
To: beginners@perl.org
Subject: Library


I am trying to create my own library. I figured it should have an extension 
of .pm and must be within the $PATH, where perl searches for
libraries.

The following error is displayed:

mylib.pm did not return a true value at program_name, line 2.
line 2 is just "use mylib"

What is the recommended approach for creating your own library?

- Chi

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About