in reply to Effecient shortcut for ?:
If you don't specify a binding for "a" when you create the instance, you get the default. If do specify a binding, as with my $foo = new Foo(a => 47); then the default is overlaid.sub new { my $pkg = shift; my $self = { a => $default_for_a, @_ }; bless $self, $pkg; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Effecient shortcut for ?:
by tadman (Prior) on Aug 07, 2002 at 18:49 UTC | |
by chromatic (Archbishop) on Aug 07, 2002 at 19:22 UTC |