perlmodlib.pod

来自「ARM上的如果你对底层感兴趣」· POD 代码 · 共 1,103 行 · 第 1/3 页

POD
1,103
字号
=head1 NAME

perlmodlib - constructing new Perl modules and finding existing ones

=head1 DESCRIPTION

=head1 THE PERL MODULE LIBRARY

A number of modules are included the Perl distribution.  These are
described below, and all end in F<.pm>.  You may also discover files in
the library directory that end in either F<.pl> or F<.ph>.  These are old
libraries supplied so that old programs that use them still run.  The
F<.pl> files will all eventually be converted into standard modules, and
the F<.ph> files made by B<h2ph> will probably end up as extension modules
made by B<h2xs>.  (Some F<.ph> values may already be available through the
POSIX module.)  The B<pl2pm> file in the distribution may help in your
conversion, but it's just a mechanical process and therefore far from
bulletproof.

=head2 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
C<use>, or C<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 C<$^H> hints variable, the C<use
vars> and C<use subs> declarations are not BLOCK-scoped.  They allow
you to predeclare a variables or subroutines within a particular
I<file> rather than just a block.  Such declarations are effective
for the entire file for which they were declared.  You cannot rescind
them with C<no vars> or C<no subs>.

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

=over 12

=item use autouse MODULE => qw(sub1 sub2 sub3)

Defers C<require MODULE> until someone calls one of the specified
subroutines (which must be exported by MODULE).  This pragma should be
used with caution, and only when necessary.

=item blib

manipulate @INC at compile time to use MakeMaker's uninstalled version
of a package

=item diagnostics

force verbose warning diagnostics

=item integer

compute arithmetic in integer instead of double

=item less

request less of something from the compiler

=item lib

manipulate @INC at compile time

=item locale

use or ignore current locale for builtin operations (see L<perllocale>)

=item ops

restrict named opcodes when compiling or running Perl code

=item overload

overload basic Perl operations

=item re

alter behaviour of regular expressions

=item sigtrap

enable simple signal handling

=item strict

restrict unsafe constructs

=item subs

predeclare sub names

=item vmsish

adopt certain VMS-specific behaviors

=item vars

predeclare global variable names

=back

=head2 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.

=over 12

=item AnyDBM_File

provide framework for multiple DBMs

=item AutoLoader

load functions only on demand

=item AutoSplit

split a package for autoloading

=item Benchmark

benchmark running times of code

=item CPAN

interface to Comprehensive Perl Archive Network

=item CPAN::FirstTime

create a CPAN configuration file

=item CPAN::Nox

run CPAN while avoiding compiled extensions

=item Carp

warn of errors (from perspective of caller)

=item Class::Struct

declare struct-like datatypes

=item Config

access Perl configuration information

=item Cwd

get pathname of current working directory

=item DB_File

access to Berkeley DB

=item Devel::SelfStubber

generate stubs for a SelfLoading module

=item DirHandle

supply object methods for directory handles

=item DynaLoader

dynamically load C libraries into Perl code

=item English

use nice English (or awk) names for ugly punctuation variables

=item Env

import environment variables

=item Exporter

implements default import method for modules

=item ExtUtils::Embed

utilities for embedding Perl in C/C++ applications

=item ExtUtils::Install

install files from here to there

=item ExtUtils::Liblist

determine libraries to use and how to use them

=item ExtUtils::MM_OS2

methods to override Unix behaviour in ExtUtils::MakeMaker

=item ExtUtils::MM_Unix

methods used by ExtUtils::MakeMaker

=item ExtUtils::MM_VMS

methods to override Unix behaviour in ExtUtils::MakeMaker

=item ExtUtils::MakeMaker

create an extension Makefile

=item ExtUtils::Manifest

utilities to write and check a MANIFEST file

=item ExtUtils::Mkbootstrap

make a bootstrap file for use by DynaLoader

=item ExtUtils::Mksymlists

write linker options files for dynamic extension

=item ExtUtils::testlib

add blib/* directories to @INC

=item Fatal

make errors in builtins or Perl functions fatal

=item Fcntl

load the C Fcntl.h defines

=item File::Basename

split a pathname into pieces

=item File::CheckTree

run many filetest checks on a tree

=item File::Compare

compare files or filehandles

=item File::Copy

copy files or filehandles

=item File::Find

traverse a file tree

=item File::Path

create or remove a series of directories

=item File::stat

by-name interface to Perl's builtin stat() functions

=item FileCache

keep more files open than the system permits

=item FileHandle

supply object methods for filehandles

=item FindBin

locate directory of original Perl script

=item GDBM_File

access to the gdbm library

=item Getopt::Long

extended processing of command line options

=item Getopt::Std

process single-character switches with switch clustering

=item I18N::Collate

compare 8-bit scalar data according to the current locale

=item IO

load various IO modules

=item IO::File

supply object methods for filehandles

=item IO::Handle

supply object methods for I/O handles

=item IO::Pipe

supply object methods for pipes

=item IO::Seekable

supply seek based methods for I/O objects

=item IO::Select

OO interface to the select system call

=item IO::Socket

object interface to socket communications

=item IPC::Open2

open a process for both reading and writing

=item IPC::Open3

open a process for reading, writing, and error handling

=item Math::BigFloat

arbitrary length float math package

=item Math::BigInt

arbitrary size integer math package

=item Math::Complex

complex numbers and associated mathematical functions

=item Math::Trig

simple interface to parts of Math::Complex for those who
need trigonometric functions only for real numbers

=item NDBM_File

tied access to ndbm files

=item Net::Ping

Hello, anybody home?

=item Net::hostent

by-name interface to Perl's builtin gethost*() functions

=item Net::netent

by-name interface to Perl's builtin getnet*() functions

=item Net::protoent

by-name interface to Perl's builtin getproto*() functions

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?