Hi all!
the subject is actually drawn from a lack of better understanding in
this particular topic...
given this code:
package MyPackge;
sub new {
my $this = shift;
.
.
.
blabla
..
.
bless $self;
return $self
}
and if i run:
my $object = MyPackage->new();
is there a way to "autoload" the object so that if i "print $object"
the object will return a given value(or a subroutine that will return
a value)
instead of its own ref & memory address ?
i tried using AUTOLOAD (which works great for missing methods and
such) but it seems that since i don't try to activate any method
on the object, perl just return the value of the object, i.e: its reference.
Thanks in advance,
Ronen
_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl

Reply via email to