in reply to Using tie to return value of anonymous sub
Defining simple accessor/mutator methods is very straightforward, and there are many modules in CPAN that make it even easier. Spiffy is one of the most popular these days, but there are many others.Your way: $player->{strength} OOP way: $player->strength Your way: $foo->{bar}->($baz) OOP way: $foo->bar($baz)
--DrWhy
"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using tie to return value of anonymous sub
by Anonymous Monk on Feb 17, 2006 at 08:18 UTC | |
|
Re^2: Using tie to return value of anonymous sub
by dabreegster (Beadle) on Feb 18, 2006 at 16:37 UTC | |
by ikegami (Patriarch) on Feb 20, 2006 at 23:54 UTC | |
by DrWhy (Chaplain) on Feb 23, 2006 at 21:08 UTC |