Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi there. What's the best way to refer to a function inside a package from within the package functions itself?
I haven't worked with modules much until now, so I've been writing:
package myPackage; sub function1{ #do stuff myPackage->function2($thing) #do stuff } sub function2{ #do stuff }
Does Perl provide a better way to do it?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using functions from their own package
by Athanasius (Archbishop) on Oct 15, 2012 at 02:59 UTC | |
by Anonymous Monk on Oct 15, 2012 at 04:01 UTC | |
|
Re: Using functions from their own package
by Anonymous Monk on Oct 15, 2012 at 02:28 UTC |