in reply to Combined tied-array / object problem
BTW a recommendation. It is tempting to think in terms of "This class is X. My object is in the class. Anything I tie is tied to X." This is a trap. You will quickly find great confusion arising from the fact that sometimes you are getting a tied thing, and sometimes you are getting the object behind the tie. Therefore I recommend that you have two classes. One for the object, and a different one to tie it to.sub test2 { my $self = shift; print tied(@$self)->{ test }, "\n"; # LINE 22 }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 1: Combined tied-array / object problem
by TheDamian (Vicar) on Nov 12, 2001 at 02:00 UTC |