> Just created my 1st object in Perl (with code from the Perl Developers
> Guide), and got the error:
> 'Clock.pm did not return a true value at clock_test.pl line 1.'
>
> Below is the object code, Clock.pm and the program that called it,
> clock_test.pl.
>
> I installed Clock.pm in '/Library/Perl' (Mac OS X, BSD Unix) and checked its
> syntax. Syntax also ok on clock_test.pl.
>
> Can someone tell me what the error means?
>From the perlfunc manpage:
require EXPR
...
The file must return TRUE as the last statement to indicate successful
execution of any initialization code, so it's customary to end such a file
with "1;" unless you're sure it'll return TRUE otherwise. But it's better
just to put the "1;", in case you add more statements.
The above statement holds true for use() as well. So just add a "1;" to
Clock.pm, and the error will disappear.
[snip]
Regards,
David