in reply to Perl Module Object - Return fail/success with a fault string
What you want is certainly possible, but your code in Module::Test is not how you construct objects (or "objects"). Please have a look at bless or one of the object tutorials. If your objects are merely collections of data, just return an unblessed hash reference:
sub new { ... return \%return };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Module Object - Return fail/success with a fault string
by jhyland87 (Sexton) on Jan 03, 2012 at 16:56 UTC | |
by Corion (Patriarch) on Jan 03, 2012 at 17:08 UTC | |
by jhyland87 (Sexton) on Jan 03, 2012 at 19:09 UTC | |
by Corion (Patriarch) on Jan 03, 2012 at 21:10 UTC | |
by ~~David~~ (Hermit) on Jan 03, 2012 at 17:08 UTC |