... 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...!
In reply to Re^4: Array of operators ...
by AnomalousMonk
in thread Array of operators ...
by janDD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |