perlpragma
perlpragma
NAME
perlpragma - how to write a user pragma
DESCRIPTION
A pragma is a module which influences some aspect of the compile time or run time behaviour of Perl, such as strict
or warnings
. With Perl 5.10 you are no longer limited to the built in pragmata; you can now create user pragmata that modify the behaviour of user functions within a lexical scope.
A basic example
For example, say you need to create a class implementing overloaded mathematical operators, and would like to provide your own pragma