In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Baby Lakshmi) wrote:
> I really dont understand the functionality and advantages of using bless.
bless() "tags" a reference with a package name, effectively turning
it into an object. without bless you don't have objects.
http://www.perld
On Sep 17, baby lakshmi said:
>should we have to use the bless fuction in the constructor alone we can
>use the created object ($foo) to invoke the function. isnt it??? so whatz
>the real advandage of using bless function??? and why we need to bless that
>particular ob
t; > my $food = shift;
> > print "$class eats $food\n";
> >}
>
> >In this program i dont understand what is the function of bless??? and
>where
> >xyz is stored.
>
>The bless() function takes a reference and a class, and says that the
>referenc
$food\n";
>}
>In this program i dont understand what is the function of bless??? and where
>xyz is stored.
The bless() function takes a reference and a class, and says that the
reference "belongs" to that class. Specifically, this means that the
reference can access the methods
ot;;
}
my $talking = Animal->named("xyz");
$talking ->eat("hay");
#
#
In this program i dont understand what is the function of bless??? and where
xyz is stored.
May be the conce