| CPAN Ratings (Gamma) self reviews | |
| Home | Search | About | Login |
RSS | Module Info | Add a review of self
Wow. Simple, bareword names for "self" and "args" without filters or dodgy interactions with Perl internals. I'm a believer now....
Robert Rothenberg - 2009-01-04 09:21:54
Was this review helpful to you?
Yes
No
This module is very similar to selfvars. Both modules provide for 'self' and 'args' syntactic sugar. The difference is that this this module vars uses 'self' and 'args' keyword type access, i.e. without the sigil. By contrast, selfvars use the $self, $args and $opt, i.e. variable references with the $ sigil. It is largely a matter of preference, but I like the way the appearance of the code using this module.
Performancewise, this technique is also 11% faster. Here is a benchmark on a Xeon 3.06 GHz box, your mileage may vary.
Rate selfvars-self self-self
selfvars-self 66674/s -- -10%
self-self 74269/s 11% --
ctbrown - 2008-07-20 01:53:05
Was this review helpful to you?
Yes
No
I'm going to consider using this because I'm tired of writing "my $self = shift" myself.
The code itself looked fairly clean and simple. No filters or deep magic.
In the most recent releases, 'self' is customizable, and it now works inside of 'eval'.
Mark Stosberg - 2007-12-18 14:16:11
Was this review helpful to you?
Yes
No
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|