[MacPerl] Perl Scope problem

2001-05-02 Thread Randall Perry
I'm baffled by perl's scoping of variables. In the code below, the $cust_data hash ref is inited outside the while loop. It's then set in the while with the results of a PgSQL query. In the if-else statement $cust_data can be seen in the 'if' but not in the 'else' (if I try to print a value in el

[MacPerl] Perl Object error

2001-05-19 Thread Randall Perry
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, B

Re: [MacPerl] Perl Object error

2001-05-19 Thread Randall Perry
on 5/19/01 5:34 PM, Andreas Marcel Riechert at [EMAIL PROTECTED] wrote: > > The error means Clock.pm did not return a true value. Modules have > to return a true value. This is usually done by writing: > 1; > as your last line of code. > Anyway you should read the "perlmod" documentation again: