J
Jeff Thies
I have an object and I like to print the instance of the object;
my $object_name=new MyObj();
my $object_name2=new MyObj();
package MyObj;
sub new{
my $class = shift;
my $self = {};
....
sub printInstance{
my $self=shift;
print " I'd like to print $object_name, can I do that or do I need to
pass it in directly as a property?: my $object_name=new
MyObj('object_name');";
....
I don't remember reading about that in the perl OO guides, but I may
have missed it.
Cheers,
Jeff
my $object_name=new MyObj();
my $object_name2=new MyObj();
package MyObj;
sub new{
my $class = shift;
my $self = {};
....
sub printInstance{
my $self=shift;
print " I'd like to print $object_name, can I do that or do I need to
pass it in directly as a property?: my $object_name=new
MyObj('object_name');";
....
I don't remember reading about that in the perl OO guides, but I may
have missed it.
Cheers,
Jeff