in reply to Using the strict module in object oriented programming
It sounds like you want Tie::Hash::FixedKeys
Update: The above answers the problems that you've described in the example code -- not the title of your question, which are actually two different things:
# accessing an item in a hashref: $hash->{'key'}; # calling an object method $object->method;
Although an object may be a hashref, and the methods may be accessors to the items within the hash, they don't have to be the same thing, and frequently aren't.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using the strict module in object oriented programming
by jimt (Chaplain) on Jul 25, 2006 at 14:37 UTC | |
by jhourcle (Prior) on Jul 25, 2006 at 15:00 UTC | |
by diotalevi (Canon) on Jul 25, 2006 at 20:42 UTC | |
|