rrwo has asked for the wisdom of the Perl Monks concerning the following question:
Here's a stumper: is it possible for a variable to be an object and a tied hash (or even array etc.) all at once? For example...
tie my %$hash, Class::Whatever; $hash->{foo} = "bar"; $hash->SomeMethod();
or maybe
my $obj = new Class::Whatever; $obj->{foo} = "bar"; $obj->SomeMethod();
Has this been done before? Could it be done (perhaps twiddling with attributes to say that the object is tied)?
|
---|
Replies are listed 'Best First'. | |
---|---|
(tye)Re: Object and tied hash all at once?
by tye (Sage) on Jul 07, 2001 at 01:39 UTC | |
Re: Object and tied hash all at once?
by btrott (Parson) on Jul 07, 2001 at 00:54 UTC | |
Re: Object and tied hash all at once?
by PrakashK (Pilgrim) on Jul 07, 2001 at 00:18 UTC | |
Re: Object and tied hash all at once?
by Brovnik (Hermit) on Jul 07, 2001 at 00:43 UTC | |
Re: Object and tied hash all at once?
by Anonymous Monk on Jul 07, 2001 at 00:05 UTC |
Back to
Seekers of Perl Wisdom