Reference#
Reference for pperl, a faithful Rust reimplementation of perl5 5.44. Two parts: the Perl language reference (variables, functions, operators, regex, data types, subroutines) and the Module reference for every built-in native module.
Perl language#
Modules#
Built-in modules, by top-level namespace. Badges show the feature tier and any extra Cargo features required - see Disclaimer & bug reports for how to check which features your pperl binary has.
AE- simpler/faster/newer/cooler AnyEvent APIAnyDBM_File- provide framework for multiple DBMsAnyEvent- the DBI of event loop programming
:: [DNS,Debug,Handle,IO,Impl,Log,Loop,Socket,Strict,TLS,Util]AutoLoader- load subroutines only on demandAutoSplit- split a package for autoloadingB- Inspect a running Perl program’s own optree, symbol table, and compiled subs.
:: [AV,BINOP,BM,COP,COW,CV,Concise,Deparse,FM,GV,HE,HV,IO,IV,LISTOP,LOGOP,LOOP,MAGIC,METHOP,NV,OP,Op_private,PADLIST,PADNAME,PADNAMELIST,PADOP,PMOP,PV,PVLV,PVMG,RHE,SV,SVOP,Showlex,Terse,UNOP,UNOP_AUX,Xref]Benchmark- Benchmark running times of Perl codeCPAN- query, download and build perl modules from CPAN sites
:: [Debug,Distroprefs,FirstTime,HandleConfig,Kwalify,Meta,Mirrors,Nox,Plugin,Queue,Tarzip,Version]Cairo- Perl bindings for cairo, the 2D vector graphics library.
:: [Context,Font,FontFace,FontOptions,Format,FtFontFace,Gradient,ImageSurface,LinearGradient,Matrix,Pattern,PdfSurface,PsSurface,RadialGradient,RecordingSurface,Region,ScaledFont,SolidPattern,Surface,SurfacePattern,SvgSurface,ToyFontFace]Carp- alternative warn and die for modulesClone- Make a deep, independent copy of any Perl value - hashes, arrays, scalars, references, blessed objects, tied variables, and weak references.Config- Look up the build-time configuration of the running Perl interpreter.
:: [Extensions,Perl]Coro- the only real threads in perl
:: [AIO,AnyEvent,BDB,Channel,Debug,EV,Event,Handle,LWP,RWLock,Select,Semaphore,SemaphoreSet,Signal,Socket,Specific,State,Storable,Timer,Util]Cwd- Report the current working directory and resolve paths to their absolute, symlink-free form.DB- programmatic interface to the Perl debugging APIDBI- Database independent interface for Perl
:: [Const,DBD,Gofer,Profile,ProfileData,ProfileDumper,ProfileSubs,ProxyServer,PurePerl,SQL,Util]DBM_Filter- Filter DBM keys/values
:: [compress,encode,int32,null,utf8]DB_File- Tie a Perl hash or array to a database file: a hash table, a sorted B-tree, or an array of records kept in a plain text file.Devel:: [Cover,Peek,SelfStubber,Size]Digest- Modules that calculate message digests
:: [MD5,SHA,SHA1,base,file]DirHandle- (obsolete) supply object methods for directory handlesDumpvalue- provides screen dump of Perl data.DynaLoader- Dynamically load C libraries into Perl codeEV- A fast, full-featured event loop: call your code when a file handle is readable or writable, a timer expires, a signal arrives, a child process changes state or a file changes.
:: [Async,Child,Embed,IO,Loop,Periodic,Signal,Stat,Timer,Watcher]Encode- Convert between Perl character strings and byte encodings.
:: [Alias,Byte,CJKConstants,CN,Config,EBCDIC,Encoder,Encoding,GSM0338,Guess,JP,KR,MIME,Symbol,TW,Unicode,XS,utf8]English- use nice English (or awk) names for ugly punctuation variablesEnv- perl module that imports environment variables as scalars or arraysErrno- Symbolic names for theerrno(3)values your system uses -EINTR,EAGAIN,ENOENT,EACCES,EEXIST,EIO,ENOTDIR,EISDIR,EBUSY,EPIPE,ECONNRESET,ECONNREFUSED,ETIMEDOUT, and every other errno name the host libc defines.Event- an event loop: watchers for timers, file descriptors,
:: [Event,Watcher,generic,group,idle,io,signal,timer,var]Exporter- Implements default import method for modules
:: [Heavy]ExtUtils:: [CBuilder,Command,Embed,HasCompiler,Install,Installed,Liblist,MM,MM_Any,MM_Unix,MY,MakeMaker,Manifest,Miniperl,PL2Bat,Packlist,testlib]Fatal- Replace functions with equivalents which succeed or dieFcntl- Symbolic constants forfcntl(2),flock(2),lseek(2), and file-mode bits - everything you need to callsysopen,fcntl,flock,seek, and to interpret the mode word returned bystat.File:: [Basename,Compare,Copy,DosGlob,Fetch,Find,Glob,GlobMapper,Map,Path,ShareDir,Spec,Temp,Which,stat]FileCache- keep more files open than the system permitsFileHandle- supply object methods for filehandlesFindBin- Locate directory of original Perl scriptGD- Perl bindings for libgd, the GD graphics library.
:: [Group,Image,Polygon,Polyline,Simple]GDBM_File- Tie a Perl hash to a database file with GNU dbm’s interface: its open modes, error codes, options, dumps and recovery calls.Guard- run a piece of code when a scope ends or an object goes awayHTML:: [Entities,Filter,HeadParser,LinkExtor,Parser,PullParser,Tagset,TokeParser]IO- Load the core IO modules -IO::Handle,IO::File,IO::Seekable,IO::Pipe,IO::Socket,IO::Dir- in oneuse.
:: [Compress,Dir,File,Handle,Pipe,Poll,Pty,Seekable,Select,Socket,Tty,Uncompress,Zlib]IPC:: [Cmd,Msg,Open2,Open3,Semaphore,SharedMem,SysV]Imager- Perl bindings for Imager, the raster graphics library.
:: [Color,Expr,Fill,Font,Fountain,Matrix2d,Regops,Test,Transform,TrimColorList]LMDB_File- Tie a Perl hash to an LMDB database, or drive LMDB’s environments, transactions and cursors directly.MIME:: [Base64,Charset,QuotedPrint]Math:: [BigFloat,BigInt,BigRat,Complex,GMP,Random,Trig]Memoize- Make functions faster by trading space for time - cache a function’s results by its arguments and return the cached result on a repeated call.
:: [AnyDBM_File,Expire,NDBM_File,SDBM_File,Storable]Moose- The compiled part of Moose and Class::MOP: the attribute readers of the metaclass objects, the method map cache, and a few helpers of Moose::Exporter, the type constraints and role application.NDBM_File- Tie a Perl hash to an ndbm database file, so keys and values persist between runs.NEXT- Provide a pseudo-class NEXT (et al) that allows method redispatchNet:: [Cmd,Config,Domain,FTP,NNTP,Netrc,POP3,Ping,SMTP,SSLeay,Time,hostent,netent,protoent,servent]O- Generic interface to Perl Compiler backendsODBM_File- Tie a Perl hash to an old-style dbm database file.Opcode- Name, group and mask the interpreter’s opcodes - the machinerySafecompartments are built from.PDL- the Perl Data Language: fast, vectorised, multidimensional arrays for scientific and bulk numeric work
:: [Bad,Basic,Complex,Compression,Constants,Core,Exporter,FFT,IO,Image2D,ImageND,ImageRGB,Lite,LiteF,Math,MatrixOps,Ops,Options,PP,Primitive,Slices,Trans,Transform,Types,Ufunc]POSIX- The POSIX (IEEE Std 1003.1) C standard library, exposed to Perl.
:: [SigSet,Termios]PadWalker- Reach into another subroutine’smyandourvariables - read them, change them, find out their names - from anywhere on the call stack.PerlIO- On demand loader for PerlIO layers and root of PerlIO::* name space
:: [encoding,mmap,scalar,utf8_strict,via]Pod:: [Checker,Escapes,Functions,Html,Man,ParseLink,Perldoc,Simple,Text,Usage]SDBM_File- Tie a Perl hash to an on-disk SDBM database so keys and values persist between runs.SDL2- Perl bindings for SDL2 - windows, input, timers and hardware-accelerated 2D drawing.
:: [Events,Image,Render,Surface,Video]Safe- Compile and execute code in restricted compartmentsSelectSaver- save and restore selected file handleSelfLoader- load functions only on demandSocket- BSD socket constants and address pack/unpack helpers that feed Perl’s built-insocket,bind,connect,accept,send,recv,setsockopt, andshutdown.Storable- Serialise arbitrary Perl data structures to bytes, reconstruct them later, or deep-clone them in memory.Symbol- manipulate Perl symbols and their namesTerm:: [ANSIColor,Cap,Complete,ReadKey,ReadLine,Table]Test- provides a simple framework for writing test scripts
:: [Builder,Harness,LeakTrace,More,Simple,Tester,use]Test2- Framework for writing test tools that all work together.
:: [API,AsyncSubtest,Bundle,Compare,Env,Event,EventFacet,Formatter,Handle,Hub,IPC,Manual,Mock,Plugin,Require,Suite,Todo,Tools,Util,V0,V1,Workflow]Text:: [Abbrev,Balanced,CSV,CSV_PP,LevenshteinXS,LineFold,ParseWords,Tabs,Wrap]Thread- Manipulate threads in Perl (for old code only)
:: [Queue,Semaphore]Tie:: [Array,File,Handle,Hash,Memoize,RefHash,Scalar,StdHandle,SubstrHash]Time:: [HiRes,Local,Piece,Seconds,gmtime,localtime,tm]Types:: [Serialiser]UNIVERSAL- base class for ALL classes (blessed references)XSLoader- Start the native part of a moduleXString- The string quoting helpers ofB, without loadingB._charnames- the Unicode character name table behind\N{NAME},attributes- The machinery behindsub name :attrandmy $x :attr: applying the built-in attributes, handing the others to the package that defines them, and reading attributes back.autodie- Replace functions with ones that succeed or die with lexical scope
:: [Scope,Util,exception,hints,skip]autouse- postpone load of modules until a function is usedbase- Establish an ISA relationship with base classes at compile timebigfloat- transparent big floating point number support for Perlbigint- transparent big integer support for Perlbignum- transparent big number support for Perlbigrat- transparent big rational number support for Perlblib- Use MakeMaker’s uninstalled version of a packagebuiltin- Perl pragma to import built-in utility functionsbytes- Perl pragma to expose the individual bytes of characterscharnames- access to Unicode character names and named character sequences; also define character namesconstant- Perl pragma to declare constantsdeprecate- Perl pragma for deprecating the inclusion of a module in corediagnostics- produce verbose warning diagnosticsencoding- allows you to write your script in non-ASCII and non-UTF-8
:: [warnings]experimental- Experimental features made easyfeature- Perl pragma to enable new featuresfields- compile-time class fieldsfiletest- Perl pragma to control the filetest permission operatorsif-usea Perl module if a condition holdsinteger- Perl pragma to use integer arithmetic instead of floating pointless- perl pragma to request less of somethinglib- manipulate @INC at compile timelocale- Perl pragma to use or avoid POSIX locales for built-in operationsmro- Method Resolution Order - how Perl decides which parent class’s method a call inherits.ok- Alternative to Test::More::use_okopen- perl pragma to set default PerlIO layers for input and outputops- Perl pragma to restrict unsafe operations when compilingoverload- Package for overloading Perl operationsoverloading- perl pragma to lexically control overloadingparent- Establish an ISA relationship with base classes at compile timeperlfaq- Frequently asked questions about Perlre- Therepragma and regular-expression introspection module.sigtrap- Perl pragma to enable simple signal handlingsort- perl pragma to control sort() behaviourstable- Experimental features made easy, once we know they’re stablestrict- Perl pragma to restrict unsafe constructssubs- Perl pragma to predeclare subroutine namesutf8- Perl pragma to enable/disable UTF-8 (or UTF-EBCDIC) in source codevars- Perl pragma to predeclare global variable namesversion- Turn a version string into an object you can compare, print, and introspect.warnings- Perl pragma to control optional warnings
:: [register]