nmerriweather has asked for the wisdom of the Perl Monks concerning the following question:
package Framework::myPackage ; sub _init { my $this = shift; # shift off the ref in $_[0] so we can access the pa +rams as @_ my %param = @_; #or my %param = $@_; # do i want something like that (i know thats not + real perl) } package MyApp::myPackage ; sub new { ... $this->_init( @_ ); #or $this->_init( \@_ ); #? }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: forwarding arguments to a constructor to a new function
by friedo (Prior) on Dec 21, 2005 at 05:28 UTC | |
|
Re: forwarding arguments to a constructor to a new function
by blazar (Canon) on Dec 21, 2005 at 11:05 UTC |