in reply to how to pass object to a subroutine
use strict; use warnings; package MyModule; use overload q{""} => q{printObject}; sub new { ... } ... sub printObject { # print your attributes here } package main; my $obj = MyModule->new(some => q{args}); ... print qq{$obj}; ...
I'm not sure either from your post whether this is what you want but here's hoping.
Cheers,
JohnGG
|
|---|