in reply to Embedded Class::Struct Misbehaviour
shouldn't ref($dad) say "Person" ?Not automatically. As the example in the Class::Struct doc shows, you need to initialize the field. Class::Struct enforces that it's the right type, but doesn't create the variable for you. You can do this:
to initialize the field.$folks->head( new Person .... );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Embedded Class::Struct Misbehaviour
by shemp (Deacon) on Nov 06, 2002 at 20:23 UTC |