October 7 2020 | Perl 7: An Opinionated Introduction | Back Next |
Were they introduced merely to shut up people coming from other languages who expected them?
In past three months I've learned about their most important use case:
use Test::More;
ok("cogito ergo sum", "Unit test written with parentheses");
ok "caveat emptor", "Take advantage of fact that Test::More::ok() is prototyped -- Look Ma, no parens!"
Prototypes let you define functions that look like Perl built-ins
... and therefore don't require parentheses around their arguments
Home Last TOC | Copyright © 2020 James E Keenan | Back Next |