diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-11-19 14:16:00 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1996-11-19 14:16:00 +1200 |
commit | 55497cffdd24c959994f9a8ddd56db8ce85e1c5b (patch) | |
tree | 444dfb8adc0e5b96d56e0532791122c366f50a3e /pod/perlmod.pod | |
parent | c822f08a5087943f7d9e2c36ce42ea035f03ab97 (diff) | |
download | perl-55497cffdd24c959994f9a8ddd56db8ce85e1c5b.tar.gz |
[inseparable changes from patch from perl5.003_07 to perl5.003_08]
CORE LANGUAGE CHANGES
Subject: Bitwise op sign rationalization
From: Chip Salzenberg <chip@atlantic.net>
Files: op.c opcode.pl pod/perlop.pod pod/perltoc.pod pp.c pp.h pp_hot.c proto.h sv.c t/op/bop.t
Make bitwise ops result in unsigned values, unless C<use
integer> is in effect. Includes initial support for UVs.
Subject: Defined scoping for C<my> in control structures
From: Chip Salzenberg <chip@atlantic.net>
Files: op.c perly.c perly.c.diff perly.h perly.y proto.h toke.c
Finally defines semantics of "my" in control expressions,
like the condition of "if" and "while". In all cases, scope
of a "my" var extends to the end of the entire control
structure. Also adds new construct "for my", which
automatically declares the control variable "my" and limits
its scope to the loop.
Subject: Fix ++/-- after int conversion (e.g. 'printf "%d"')
From: Chip Salzenberg <chip@atlantic.net>
Files: pp.c pp_hot.c sv.c
This patch makes Perl correctly ignore SvIVX() if either
NOK or POK is true, since SvIVX() may be a truncated or
overflowed version of the real value.
Subject: Make code match Camel II re: functions that use $_
From: Paul Marquess <pmarquess@bfsec.bt.co.uk>
Files: opcode.pl
Subject: Provide scalar context on left side of "->"
From: Chip Salzenberg <chip@atlantic.net>
Files: perly.c perly.y
Subject: Quote bearword package/handle FOO in "funcname FOO => 'bar'"
From: Chip Salzenberg <chip@atlantic.net>
Files: toke.c
OTHER CORE CHANGES
Subject: Warn on overflow of octal and hex integers
From: Chip Salzenberg <chip@atlantic.net>
Files: proto.h toke.c util.c
Subject: If -w active, warn for commas and hashes ('#') in qw()
From: Chip Salzenberg <chip@atlantic.net>
Files: toke.c
Subject: Fixes for pack('w')
From: Ulrich Pfeifer <pfeifer@charly.informatik.uni-dortmund.de>
Files: pp.c t/op/pack.t
Subject: More complete output from sv_dump()
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: sv.c
Subject: Major '..' and debugger patches
From: Ilya Zakharevich <ilya@math.ohio-state.edu>
Files: lib/perl5db.pl op.c pp_ctl.c scope.c scope.h
Subject: Fix for formline()
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: global.sym mg.c perl.h pod/perldiag.pod pp_ctl.c proto.h sv.c t/op/write.t
Subject: Fix stack botch in untie and binmode
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: pp_sys.c
Subject: Complete EMBED, including symbols from interp.sym
From: Chip Salzenberg <chip@atlantic.net>
Files: MANIFEST embed.pl ext/DynaLoader/dlutils.c ext/SDBM_File/sdbm/sdbm.h global.sym handy.h malloc.c perl.h pp_sys.c proto.h regexec.c toke.c util.c x2p/Makefile.SH x2p/a2p.h x2p/handy.h x2p/util.h
New define EMBEDMYMALLOC makes embedding total by
avoiding "Mymalloc" etc.
Subject: Support old embedding for people who want it
From: Chip Salzenberg <chip@atlantic.net>
Files: MANIFEST Makefile.SH old_embed.pl old_global.sym
PORTABILITY
Subject: Miscellaneous VMS fixes
From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>
Files: lib/ExtUtils/Liblist.pm lib/ExtUtils/MM_VMS.pm lib/Math/Complex.pm lib/Time/Local.pm lib/timelocal.pl perl.h perl_exp.SH proto.h t/TEST t/io/read.t t/lib/findbin.t t/lib/getopt.t util.c utils/h2xs.PL vms/Makefile vms/config.vms vms/descrip.mms vms/ext/Stdio/Stdio.pm vms/ext/Stdio/Stdio.xs vms/perlvms.pod vms/test.com vms/vms.c
Subject: DJGPP patches (MS-DOS)
From: "Douglas E. Wegscheid" <wegscd@whirlpool.com>
Files: doio.c dosish.h ext/SDBM_File/sdbm/sdbm.c handy.h lib/AutoSplit.pm lib/Cwd.pm lib/File/Find.pm malloc.c perl.c perl.h pp_sys.c proto.h sv.c util.c
Subject: Patch to make Perl work under AmigaOS
From: "Norbert Pueschel" <pueschel@imsdd.meb.uni-bonn.de>
Files: MANIFEST hints/amigaos.sh installman lib/File/Basename.pm lib/File/Find.pm pod/pod2man.PL pp_sys.c util.c
Diffstat (limited to 'pod/perlmod.pod')
-rw-r--r-- | pod/perlmod.pod | 262 |
1 files changed, 236 insertions, 26 deletions
diff --git a/pod/perlmod.pod b/pod/perlmod.pod index 731b25e67c..7cb3a4907e 100644 --- a/pod/perlmod.pod +++ b/pod/perlmod.pod @@ -155,6 +155,25 @@ Another use of symbol tables is for making "constant" scalars. Now you cannot alter $PI, which is probably a good thing all in all. +You can say C<*foo{PACKAGE}> and C<*foo{NAME}> to find out what name and +package the *foo symbol table entry comes from. This may be useful +in a subroutine which is passed typeglobs as arguments + + sub identify_typeglob { + my $glob = shift; + print 'You gave me ', *{$glob}{PACKAGE}, '::', *{$glob}{NAME}, "\n"; + } + identify_typeglob *foo; + identify_typeglob *bar::baz; + +This prints + + You gave me main::foo + You gave me bar::baz + +The *foo{THING} notation can also be used to obtain references to the +individual elements of *foo, see L<perlref>. + =head2 Package Constructors and Destructors There are two special subroutine definitions that function as package @@ -316,53 +335,64 @@ conversion, but it's just a mechanical process, so is far from bulletproof. They work somewhat like pragmas in that they tend to affect the compilation of your program, and thus will usually only work well when used within a -C<use>, or C<no>. These are locally scoped, so an inner BLOCK -may countermand any of these by saying +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. -The following programs are defined (and have their own documentation). +Unlike the pragrmas that effect the C<$^H> hints variable, the C<use +vars> and C<use subs> declarations are not BLOCK-scoped. They allow +you to pre-declare a variables or subroutines within a particular +<I>file</I> 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 diagnostics -Pragma to produce enhanced diagnostics +force verbose warning diagnostics =item integer -Pragma to compute arithmetic in integer instead of double +compute arithmetic in integer instead of double =item less -Pragma to request less of something from the compiler +request less of something from the compiler + +=item lib + +manipulate @INC at compile time =item ops -Pragma to restrict use of unsafe opcodes +restrict unsafe operations when compiling =item overload -Pragma for overloading operators +package for overloading perl operations =item sigtrap -Pragma to enable stack backtrace on unexpected signals +enable simple signal handling =item strict -Pragma to restrict unsafe constructs +restrict unsafe constructs =item subs -Pragma to predeclare sub names +predeclare sub names =item vars -Pragma to predeclare global symbols +predeclare global variable names =back @@ -396,7 +426,7 @@ warn of errors (from perspective of caller) =item Config -access Perl configuration option +access Perl configuration information =item Cwd @@ -404,27 +434,39 @@ get pathname of current working directory =item DB_File -Perl access to Berkeley DB +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 B<awk>) names for ugly punctuation variables +use nice English (or awk) names for ugly punctuation variables =item Env -perl module that imports environment variables +import environment variables =item Exporter -provide import/export controls for Perl modules +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 @@ -438,13 +480,37 @@ create an extension Makefile utilities to write and check a MANIFEST file +=item ExtUtils::Miniperl + +write the C code for perlmain.c + =item ExtUtils::Mkbootstrap make a bootstrap file for use by DynaLoader -=item ExtUtils::Miniperl +=item ExtUtils::Mksymlists + +write linker options files for dynamic extension + +=item ExtUtils::MM_OS2 + +methods to override UN*X behaviour in ExtUtils::MakeMaker + +=item ExtUtils::MM_Unix + +methods used by ExtUtils::MakeMaker + +=item ExtUtils::MM_VMS + +methods to override UN*X behaviour in ExtUtils::MakeMaker -!!!GOOD QUESTION!!! +=item ExtUtils::testlib + +add blib/* directories to @INC + +=item Fatal + +replace functions with equivalents which succeed or die =item Fcntl @@ -454,10 +520,18 @@ load the C Fcntl.h defines parse file specifications +=item FileCache + +keep more files open than the system permits + =item File::CheckTree run many filetest checks on a tree +=item File::Copy + +Copy files or filehandles + =item File::Find traverse a file tree @@ -470,46 +544,146 @@ supply object methods for filehandles create or remove a series of directories +=item FindBin + +locate directory of original perl script + +=item GDBM_File + +access to the gdbm library. + =item Getopt::Long -extended getopt processing +extended processing of command line options =item Getopt::Std -Process single-character switches with switch clustering +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 -a process for both reading and writing +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 NDBM_File + +tied access to ndbm files + =item Net::Ping check a host for upness +=item Opcode + +disable named opcodes when compiling perl code + +=item Pod::Text + +convert POD data to formatted ASCII text + =item POSIX -Perl interface to IEEE Std 1003.1 +interface to IEEE Std 1003.1 + +=item Safe + +compile and execute code in restricted compartments + +=item SDBM_File + +tied access to sdbm files + +=item Search::Dict + +search for key in dictionary file + +=item SelectSaver + +save and restore selected file handle =item SelfLoader load functions only on demand -=item Safe +=item Shell -Creation controlled compartments in which perl code can be evaluated. +run shell commands transparently within perl =item Socket load the C socket.h defines and structure manipulators +=item Symbol + +manipulate Perl symbols and their names + +=item Sys::Hostname + +try every conceivable way to get hostname + +=item Sys::Syslog + +interface to the UNIX syslog(3) calls + +=item Term::Cap + +Perl termcap interface + +=item Term::Complete + +word completion module + +=item Term::ReadLine + +interface to various readline packages. + =item Test::Harness run perl standard test scripts with statistics @@ -518,6 +692,42 @@ run perl standard test scripts with statistics create an abbreviation table from a list +=item Text::ParseWords + +parse text into an array of tokens + +=item Text::Soundex + +implementation of the Soundex Algorithm as Described by Knuth + +=item Text::Tabs + +expand and unexpand tabs per the unix expand(1) and unexpand(1) + +=item Text::Wrap + +line wrapping to form simple paragraphs + +=item Tie::Hash + +base class definitions for tied hashes + +=item Tie::Scalar + +base class definitions for tied scalars + +=item Tie::SubstrHash + +fixed-table-size, fixed-key-length hashing + +=item Time::Local + +efficiently compute time from local and GMT time + +=item UNIVERSAL + +base class for ALL classes (blessed references) + =back To find out I<all> the modules installed on your system, including @@ -927,7 +1137,7 @@ Copying, ToDo etc. =item Adding a Copyright Notice. -How you choose to license your work is a personal decision. +How you choose to licence your work is a personal decision. The general mechanism is to assert your Copyright and then make a declaration of how others may copy/use/modify your work. |