Montana ,
Read the ## part in ur attached mail below:
--- montana <[EMAIL PROTECTED]>
wrote: > So looking at the following package:
> { package Horse;
> @ISA = qw(Animal);
> sub sound { "neigh" }
> sub name {
> my $self = shift;
> $$self;
> }
> sub named {
> my $class = shift;
> my $name = shift;
> bless \$name, $class;
> }
> }
>
> followed by the following instantiation lines:
>
> my $talking = Horse->named("Mr. Ed");
> print $talking->name, " says ", $talking->sound,
> "\n";
>
> The only variable I see passed to the package is the
> name "Mr. Ed" which is in fact passed to the
> constructor "named" located in the package "Horse".
> Is this correct?
### yeah
> So the constructor "named" takes the following list:
>
> @_ = {Horse, "Mr. Ed"}
>
> Is this correct?
## Yeah
> If so then "Horse" would be put
> into the scalar $class, and "Mr. Ed" would be put
> into the scalar $name. Is this correct? Ok so is
> $talking now an instance? And how does the
> "$talking->sound" produce "neigh"? Is the "@ISA"
> line and the sub name function needed in this
> package for Horse to still work, or is that there
> for inheritance purposes only?
## So you have finally read the perlboot :)
> Thanks.
> SA
>
> P.S. I kind of try to work my questions out as I go
> along so sorry for the details if it is too much.
>
>
> --
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]