Wow. Simple, bareword names for "self" and "args" without filters or dodgy interactions with Perl internals. I'm a believer now....
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% --
3 out of 3 found this review helpful. 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'.
10 out of 11 found this review helpful. Was this review helpful to you? Yes No