Chapter 14. Pragmatic Modules

Pragmatic modules affect the compilation of your program. Pragmatic modules can be activated (imported) with use and deactivated with no. These are usually lexically scoped.

attributes

Enables attributes.

autouse module => funcs

Determines that the module will not be loaded until one of the named functions is called.

base classes

Establishes an IS-A relationship with the named classes at compile time.

bigint [ options ]

Uses the Math::BigInt package to handle all integer calculations transparently.

options can be accuracy, precision, trace, version, and lib. One-letter abbreviations are allowed. Accuracy and precision require a numeric argument, and lib requires the name of a Perl module to handle the calculations.

bignum [ options ]

Uses the Math::BigNum package to handle all numeric calculations transparently.

See bigint on the facing page for options.

bigrat

Use the Math::BigNum and Math::BigRat packages to handle all numeric calculations transparently.

See bigint on the preceding page for options.

blib [ dir ]

Uses the MakeMaker’s uninstalled version of a package. dir defaults to the current directory. Used for testing of uninstalled packages.

bytes

Treat character data as strict 8-bit bytes, as opposed to Unicode UTF-8.

charnames [ sets ]

Enables character names to be expanded in strings using \N escapes.

constant name => value

Defines name to represent a constant value.

diagnostics [ verbosity ]

Forces verbose warning diagnostics and suppression of duplicate warnings. ...

Get Perl Pocket Reference, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.