shemp has asked for the wisdom of the Perl Monks concerning the following question:
Now, the output from this program is:#!/usr/bin/perl -w use Class::Struct; struct Person => { name => '$', age => '$', }; struct Family => { head => 'Person', address => '$', members => '@', }; { my $folks = Family->new(); my $dad = $folks->head(); print "dad = $dad , its a " . ref($dad) . "\n"; $dad->name("John"); $dad->age(34); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Embedded Class::Struct Misbehaviour
by shemp (Deacon) on Nov 06, 2002 at 18:30 UTC | |
|
Re: Embedded Class::Struct Misbehaviour
by jdporter (Paladin) on Nov 06, 2002 at 18:34 UTC | |
by shemp (Deacon) on Nov 06, 2002 at 20:23 UTC |