in reply to Re^3: Array of operators ...
in thread Array of operators ...
... tighter encapsulation ...
I doubt any of this will be new to you, but just to clarify my thoughts for myself, I suppose what I really had in mind was actually two separate and disparate effects:
>perl -wMstrict -le "print 'before: ', defined S() ? S() : 'undefined'; ;; { my $x = 42; ;; sub S { return $x; } } ;; print 'after: ', defined S() ? S() : 'undefined'; " before: undefined after: 42
Where M.pm is:>perl -wMstrict -le "print M::get_x(); ;; use M; ;; print M::get_x(); " 42 42
package M; { my $x = 42; sub get_x { return $x; } sub set_x { return $x = $_[0]; } } my $y = 1729; sub cannot_access_x { return $y; } 1;
Oh, and:
... consistently 2% faster ...
I'm not sure I really believe in a 2% performance difference reported by Benchmark, but as long as it's you...!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Array of operators ...
by kcott (Archbishop) on Sep 14, 2013 at 12:30 UTC |