Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Re: Re: Re: Why get() and set() accessor methods are evil

by hardburn (Abbot)
on Nov 25, 2003 at 18:57 UTC ( [id://310018]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Why get() and set() accessor methods are evil
in thread Why get() and set() accessor methods are evil

One reason you wouldn't want to is that is Perl's context-sensitivity. By using ArrayList, which would be implemented as a scalar holding a referance, you're now putting things in scalar context that really should be in list context.

BTW--Check out the Class::Iterator module for doing this.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-28 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found