in reply to Perl Object as Hash, Array & Scalar in the same time! ( $O->{k} | $O->[0] | $O )
A question, why doesn't $this get overwritten in the symbol table?
I guess the prepending of '*' is causing a separate entry to be written out for each data type?*$this = \$scalar ; *$this = [qw(a b c)] ; *$this = {A => 10 , B => 20 , C => 30} ;
Also, what is this for? Typically in OOP you really don't want other code accessing data members directly, but rather through methods. It is neat though :^)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl Object as Hash, Array & Scalar in the same time! ( $O->{k} | $O->[0] | $O )
by PodMaster (Abbot) on May 09, 2003 at 22:30 UTC | |
|
Re: Re: Perl Object as Hash, Array & Scalar in the same time! ( $O->{k} | $O->[0] | $O )
by gmpassos (Priest) on May 10, 2003 at 01:20 UTC |