in reply to A simple example OO script for total beginners
1; # this 1; is neccessary for our class to work
Although this is true, I think that it would be more instructive to indicate what the 1; statement does, and why it is neccessary for the package to work.
The module has to return something to indicate success ie. a non-zero/null value. Someone new to the language might not know that by default perl will return the value of last statement. Perhaps you should use an explicit return statement, something like:
return 1; # let program know package has successfully compiled
Rather than just mentioning that there are other tutorials available, it would also be useful to link to some of them from this post.
</ajdelore>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: A simple example OO script for total beginners
by nothingmuch (Priest) on Dec 30, 2003 at 01:29 UTC | |
Re^2: A simple example OO script for total beginners
by shobhit (Sexton) on Apr 27, 2007 at 19:53 UTC |
In Section
Tutorials