in reply to Perl "new" command
This:
Foo->bar($baz)is basically just syntactic sugar for:
Foo::bar("Foo", $baz)with one key exception: in the first example, if the "Foo" package doesn't have a sub called "bar", then the object-oriented concept of inheritance is used to search for it in some other packages.
So in your example, the list of keys accepted by StatView::Script->new can probably be seen by examining the new sub in the StatView::Script package.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl "new" command
by akagrawal3 (Beadle) on Mar 01, 2012 at 10:19 UTC | |
by tobyink (Canon) on Mar 01, 2012 at 11:31 UTC | |
by JavaFan (Canon) on Mar 01, 2012 at 11:42 UTC |