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 object to some specific
Hello Jeff,
Thank you for ur reply.
> >package Animal;
> >sub named {
> > my $class = shift;
> > my $name = shift;
> > bless \$name, $class;
> >}
> >sub eat{
> > my $class = shift;
> > $class = ref($class) || $class;
> > my $food = shift;
> > print "$class eats $food\n";
> >}
>
>
On Sep 14, baby lakshmi said:
>package Animal;
>sub named {
> my $class = shift;
> my $name = shift;
> bless \$name, $class;
>}
>sub eat{
> my $class = shift;
> $class = ref($class) || $class;
> my $food = shift;
> print "$class eats $food\n";
>}
>In this program i dont understand