You are viewing the version of this documentation from Perl 5.005_02. View the latest version

CONTENTS

Pragmatic Modules

They work somewhat like pragmas in that they tend to affect the compilation of your program, and thus will usually work well only when used within a use, or no. Most of these are locally scoped, so an inner BLOCK may countermand any of these by saying:

no integer;
no strict 'refs';

which lasts until the end of that BLOCK.

Unlike the pragmas that effect the $^H hints variable, the use vars and use subs declarations are not BLOCK-scoped. They allow you to predeclare a variables or subroutines within a particular file rather than just a block. Such declarations are effective for the entire file for which they were declared. You cannot rescind them with no vars or no subs.

The following pragmas are defined (and have their own documentation).

Standard Modules

Standard, bundled modules are all expected to behave in a well-defined manner with respect to namespace pollution because they use the Exporter module. See their own documentation for details.