in reply to Re: Re: Re: Perl module symbol import versus direct invocation
in thread Perl module symbol import versus direct invocation
A reason to have calls as class methods instead of as functions, is the simple fact that now, inheritance works. It doesn't when you call a sub as a function.
Two rather well known class methods are import, automatically invoked by use — and often inherited :-) from Exporter, and new, a name people often choose for a sub that serves to create a new instance of a class.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Perl module symbol import versus direct invocation
by adrianh (Chancellor) on Feb 26, 2003 at 14:00 UTC |