3 ms·
That section reminded me of how constants are implemented via functions in Perl e.g. use constant PI => 4 * atan2(1, 1); under the hood becomes sub PI ()
by arunix 8y ago
That section reminded me of how constants are implemented via functions in Perl e.g.
use constant PI => 4 * atan2(1, 1);
under the hood becomes
sub PI () { 4 * atan2 1, 1 }
http://perldoc.perl.org/constant.html#TECHNICAL-NOTES http://perldoc.perl.org/constant.html#TECHNICAL-NOTES