Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^3: Iterating over *any* thing in Perl

by adrianh (Chancellor)
on Dec 04, 2002 at 01:13 UTC ( #217385=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Iterating over *any* thing in Perl
in thread Iterating over *any* thing in Perl

Some options (in no particular order):

  • Use a proper OO language ;-)
  • Wait for Perl 6
  • Use inside out objects (for me, the neatest discovery from perlmonks so far - ++Abigail-II).
  • Hide your objects implementation behind a proxy object (Class::Delegation is handy for this sort of thing).
  • Document that you use a hash. Document the slot(s) that you use. One idiom that I've seen a few times is to do it as $object->{CLASS_NAME}->{SLOT_NAME}

Any more for any more?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://217385]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2021-05-06 18:09 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (78 votes). Check out past polls.