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:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 5:56 PM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • Library Chi Lin
    • Kingsbury, Michael

Reply via email to