APM: Just need structs
Tim McDaniel
tmcd at panix.com
Thu Sep 13 09:42:36 PDT 2007
On Thu, 13 Sep 2007, Taylor Carpenter <taylor at codecafe.com> wrote:
> If the 3 structs you need all have the same 2 fields
No, no -- three different types with many instances each, not one type
with three instances.
> package Person;
>
> sub new {
> my $self = {};
> $self->{name} = undef;
> $self->{age} = 0;
> $self->{favorite_foods} = [];
> bless($self);
> return $self;
> }
Thanks. Looks like "man perlobj", without inheritance and
"$obj->new()".
--
Tim McDaniel, tmcd at panix.com
More information about the Austin
mailing list