in reply to OO problem showing i am a newbie at OO

I can't tell whather your tried to use or require, but did you try checking whether thing.pl has a true value as its last statement?

After Compline,
Zaxo

  • Comment on Re: OO problem showing i am a newbie at OO

Replies are listed 'Best First'.
Re: Re: OO problem showing i am a newbie at OO
by davido (Cardinal) on Dec 13, 2003 at 05:52 UTC
    It is a very common practice (and one you'll even find demonstrated in Programming Perl, the Camel book) to put a  1; as the last line of your module so that the module returns true. Try it and see if that clears up your problem.

    Update: To clarify, I just wanted to quote the relevant statement out of Advanced Perl Programming (the Panther book):

    When a file is require'd or use'd, it is expected to return a Boolean success value (zero for failure, nonzero for success). That is, the last executing statement at global scope must be a statement such as "return 1;" or just "1;". Note that this is not necessarily the last statement in the file; it is just the last executing statement.


    Dave