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).
arybase - Set indexing base via $[
attributes - Get/set subroutine or variable attributes
autodie - Replace functions with ones that succeed or die with lexical scope
autodie::exception - Exceptions from autodying functions.
autodie::exception::system - Exceptions from autodying system().
autodie::hints - Provide hints about user subroutines to autodie
autodie::skip - Skip a package when throwing autodie exceptions
autouse - Postpone load of modules until a function is used
base - Establish an ISA relationship with base classes at compile time
bigint - Transparent BigInteger support for Perl
bignum - Transparent BigNumber support for Perl
bigrat - Transparent BigNumber/BigRational support for Perl
blib - Use MakeMaker's uninstalled version of a package
bytes - Expose the individual bytes of characters
charnames - Access to Unicode character names and named character sequences; also define character names
constant - Declare constants
deprecate - Perl pragma for deprecating the core version of a module
diagnostics - Produce verbose warning diagnostics
encoding - Allows you to write your script in non-ASCII and non-UTF-8
encoding::warnings - Warn on implicit encoding conversions
experimental - Experimental features made easy
feature - Enable new features
fields - Compile-time class fields
filetest - Control the filetest permission operators
if - use a Perl module if a condition holds (also can no a module)
integer - Use integer arithmetic instead of floating point
less - Request less of something
lib - Manipulate @INC at compile time
locale - Use or avoid POSIX locales for built-in operations
mro - Method Resolution Order
ok - Alternative to Test::More::use_ok
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
parent - Establish an ISA relationship with base classes at compile time
re - Alter regular expression behaviour
sigtrap - Enable simple signal handling
sort - Control sort() behaviour
strict - Restrict unsafe constructs
subs - Predeclare sub names
threads - Perl interpreter-based threads
threads::shared - Perl extension for sharing data structures between threads
utf8 - Enable/disable UTF-8 (or UTF-EBCDIC) in source code
vars - Predeclare global variable names
version - Perl extension for Version Objects
vmsish - Control VMS-specific language features
warnings::register - Warnings import function
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.
Amiga::ARexx - Perl extension for ARexx support
Amiga::Exec - Perl extension for low level amiga support
AnyDBM_File - Provide framework for multiple DBMs
App::Cpan - Easily interact with CPAN from the command line
App::Prove - Implements the prove command.
App::Prove::State - State storage for the prove command.
App::Prove::State::Result - Individual test suite results.
App::Prove::State::Result::Test - Individual test results.
Archive::Tar - Module for manipulations of tar archives
Archive::Tar::File - A subclass for in-memory extracted file from Archive::Tar
Attribute::Handlers - Simpler definition of attribute handlers
AutoLoader - Load subroutines only on demand
AutoSplit - Split a package for autoloading
B - The Perl Compiler Backend
B::Concise - Walk Perl syntax tree, printing concise info about ops
B::Debug - Walk Perl syntax tree, printing debug info about ops
B::Deparse - Perl compiler backend to produce perl code
B::Op_private - OP op_private flag definitions
B::Showlex - Show lexical variables used in functions or files
B::Terse - Walk Perl syntax tree, printing terse info about ops
B::Xref - Generates cross reference reports for Perl programs
Benchmark - Benchmark running times of Perl code
IO::Socket::IP - Family-neutral IP socket supporting both IPv4 and IPv6
Socket - Networking constants and support functions
CORE - Namespace for Perl's core routines
CPAN - Query, download and build perl modules from CPAN sites
CPAN::API::HOWTO - A recipe book for programming with CPAN.pm
CPAN::Debug - Internal debugging for CPAN.pm
CPAN::Distroprefs - Read and match distroprefs
CPAN::FirstTime - Utility for CPAN::Config file Initialization
CPAN::HandleConfig - Internal configuration handling for CPAN.pm
CPAN::Kwalify - Interface between CPAN.pm and Kwalify.pm
CPAN::Meta - The distribution metadata for a CPAN dist
CPAN::Meta::Converter - Convert CPAN distribution metadata structures
CPAN::Meta::Feature - An optional feature provided by a CPAN distribution
CPAN::Meta::History - History of CPAN Meta Spec changes
CPAN::Meta::History::Meta_1_0 - Version 1.0 metadata specification for META.yml
CPAN::Meta::History::Meta_1_1 - Version 1.1 metadata specification for META.yml
CPAN::Meta::History::Meta_1_2 - Version 1.2 metadata specification for META.yml
CPAN::Meta::History::Meta_1_3 - Version 1.3 metadata specification for META.yml
CPAN::Meta::History::Meta_1_4 - Version 1.4 metadata specification for META.yml
CPAN::Meta::Merge - Merging CPAN Meta fragments
CPAN::Meta::Prereqs - A set of distribution prerequisites by phase and type
CPAN::Meta::Requirements - A set of version requirements for a CPAN dist
CPAN::Meta::Spec - Specification for CPAN distribution metadata
CPAN::Meta::Validator - Validate CPAN distribution metadata structures
CPAN::Meta::YAML - Read and write a subset of YAML for CPAN Meta files
CPAN::Nox - Wrapper around CPAN.pm without using any XS module
CPAN::Plugin - Base class for CPAN shell extensions
CPAN::Plugin::Specfile - Proof of concept implementation of a trivial CPAN::Plugin
CPAN::Queue - Internal queue support for CPAN.pm
CPAN::Tarzip - Internal handling of tar archives for CPAN.pm
CPAN::Version - Utility functions to compare CPAN versions
Carp - Alternative warn and die for modules
Class::Struct - Declare struct-like datatypes as Perl classes
Compress::Raw::Bzip2 - Low-Level Interface to bzip2 compression library
Compress::Raw::Zlib - Low-Level Interface to zlib compression library
Compress::Zlib - Interface to zlib compression library
Config - Access Perl configuration information
Config::Perl::V - Structured data retrieval of perl -V output
Cwd - Get pathname of current working directory
DB - Programmatic interface to the Perl debugging API
DBM_Filter - Filter DBM keys/values
DBM_Filter::compress - Filter for DBM_Filter
DBM_Filter::encode - Filter for DBM_Filter
DBM_Filter::int32 - Filter for DBM_Filter
DBM_Filter::null - Filter for DBM_Filter
DBM_Filter::utf8 - Filter for DBM_Filter
DB_File - Perl5 access to Berkeley DB version 1.x
Data::Dumper - Stringified perl data structures, suitable for both printing and eval
Devel::PPPort - Perl/Pollution/Portability
Devel::Peek - A data debugging tool for the XS programmer
Devel::SelfStubber - Generate stubs for a SelfLoading module
Digest - Modules that calculate message digests
Digest::MD5 - Perl interface to the MD5 Algorithm
Digest::SHA - Perl extension for SHA-1/224/256/384/512
Digest::base - Digest base class
Digest::file - Calculate digests of files
DirHandle - Supply object methods for directory handles
Dumpvalue - Provides screen dump of Perl data.
DynaLoader - Dynamically load C libraries into Perl code
Encode - Character encodings in Perl
Encode::Alias - Alias definitions to encodings
Encode::Byte - Single Byte Encodings
Encode::CJKConstants - Internally used by Encode::??::ISO_2022_*
Encode::CN - China-based Chinese Encodings
Encode::CN::HZ - Internally used by Encode::CN
Encode::Config - Internally used by Encode
Encode::EBCDIC - EBCDIC Encodings
Encode::Encoder - Object Oriented Encoder
Encode::Encoding - Encode Implementation Base Class
Encode::GSM0338 - ESTI GSM 03.38 Encoding
Encode::Guess - Guesses encoding from data
Encode::JP - Japanese Encodings
Encode::JP::H2Z - Internally used by Encode::JP::2022_JP*
Encode::JP::JIS7 - Internally used by Encode::JP
Encode::KR - Korean Encodings
Encode::KR::2022_KR - Internally used by Encode::KR
Encode::MIME::Header - MIME 'B' and 'Q' header encoding
Encode::MIME::Name - Internally used by Encode
Encode::PerlIO - A detailed document on Encode and PerlIO
Encode::Supported - Encodings supported by Encode
Encode::Symbol - Symbol Encodings
Encode::TW - Taiwan-based Chinese Encodings
Encode::Unicode - Various Unicode Transformation Formats
Encode::Unicode::UTF7 - UTF-7 encoding
English - Use nice English (or awk) names for ugly punctuation variables
Env - Perl module that imports environment variables as scalars or arrays
Errno - System errno constants
Exporter - Implements default import method for modules
Exporter::Heavy - Exporter guts
ExtUtils::CBuilder - Compile and link C code for Perl modules
ExtUtils::CBuilder::Platform::Windows - Builder class for Windows platforms
ExtUtils::Command - Utilities to replace common UNIX commands in Makefiles etc.
ExtUtils::Command::MM - Commands for the MM's to use in Makefiles
ExtUtils::Constant - Generate XS code to import C header constants
ExtUtils::Constant::Base - Base class for ExtUtils::Constant objects
ExtUtils::Constant::Utils - Helper functions for ExtUtils::Constant
ExtUtils::Constant::XS - Generate C code for XS modules' constants.
ExtUtils::Embed - Utilities for embedding Perl in C/C++ applications
ExtUtils::Install - Install files from here to there
ExtUtils::Installed - Inventory management of installed modules
ExtUtils::Liblist - Determine libraries to use and how to use them
ExtUtils::MM - OS adjusted ExtUtils::MakeMaker subclass
ExtUtils::MM_AIX - AIX specific subclass of ExtUtils::MM_Unix
ExtUtils::MM_Any - Platform-agnostic MM methods
ExtUtils::MM_BeOS - Methods to override UN*X behaviour in ExtUtils::MakeMaker
ExtUtils::MM_Cygwin - Methods to override UN*X behaviour in ExtUtils::MakeMaker
ExtUtils::MM_DOS - DOS specific subclass of ExtUtils::MM_Unix
ExtUtils::MM_Darwin - Special behaviors for OS X
ExtUtils::MM_MacOS - Once produced Makefiles for MacOS Classic
ExtUtils::MM_NW5 - Methods to override UN*X behaviour in ExtUtils::MakeMaker
ExtUtils::MM_OS2 - Methods to override UN*X behaviour in ExtUtils::MakeMaker
ExtUtils::MM_QNX - QNX specific subclass of ExtUtils::MM_Unix
ExtUtils::MM_UWIN - U/WIN specific subclass of ExtUtils::MM_Unix
ExtUtils::MM_Unix - Methods used by ExtUtils::MakeMaker
ExtUtils::MM_VMS - Methods to override UN*X behaviour in ExtUtils::MakeMaker
ExtUtils::MM_VOS - VOS specific subclass of ExtUtils::MM_Unix
ExtUtils::MM_Win32 - Methods to override UN*X behaviour in ExtUtils::MakeMaker
ExtUtils::MM_Win95 - Method to customize MakeMaker for Win9X
ExtUtils::MY - ExtUtils::MakeMaker subclass for customization
ExtUtils::MakeMaker - Create a module Makefile
ExtUtils::MakeMaker::Config - Wrapper around Config.pm
ExtUtils::MakeMaker::FAQ - Frequently Asked Questions About MakeMaker
ExtUtils::MakeMaker::Locale - Bundled Encode::Locale
ExtUtils::MakeMaker::Tutorial - Writing a module with MakeMaker
ExtUtils::Manifest - Utilities to write and check a MANIFEST file
ExtUtils::Miniperl - Write the C code for perlmain.c
ExtUtils::Mkbootstrap - Make a bootstrap file for use by DynaLoader