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

CONTENTS

#Pragmatic Modules

They work somewhat like compiler directives (pragmata) 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 lexically scoped, so an inner BLOCK may countermand them by saying:

no integer;
no strict 'refs';
no warnings;

which lasts until the end of that BLOCK.

Some pragmas are lexically scoped--typically those that affect the $^H hints variable. Others affect the current package instead, like use vars and use subs, which 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).

  • attributes - Get/set subroutine or variable attributes

  • autouse - Postpone load of modules until a function is used

  • blib - Use MakeMaker's uninstalled version of a package

  • bytes - Force byte semantics rather than character semantics

  • charnames - Define character names for \N{named} string literal escapes

  • deprecate - Perl pragma for deprecating the core version of a module

  • diagnostics - Produce verbose warning diagnostics

  • feature - Enable new features

  • filetest - Control the filetest permission operators

  • integer - Use integer arithmetic instead of floating point

  • less - Request less of something

  • locale - Use and avoid POSIX locales for built-in operations

  • mro - Method Resolution Order

  • open - Set default PerlIO layers for input and output

  • ops - Restrict unsafe operations when compiling

  • overload - Package for overloading Perl operations

  • overloading - Lexically control overloading

  • re - Alter regular expression behaviour

  • sigtrap - Enable simple signal handling

  • sort - Control sort() behaviour

  • strict - Restrict unsafe constructs

  • subs - Predeclare sub names

  • utf8 - Enable/disable UTF-8 (or UTF-EBCDIC) in source code

  • vars - Predeclare global variable names (obsolete)

  • version - Perl extension for Version Objects

  • vmsish - Control VMS-specific language features

  • warnings - Control optional warnings

  • warnings::register - Warnings import function

#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.

It's possible that not all modules listed below are installed on your system. For example, the GDBM_File module will not be installed if you don't have the gdbm library.

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /